Skip to content

Commit 6fd99d9

Browse files
author
Giulio Benedetti
authored
Add GitHub Actions workflow for Docker build
1 parent 799c21d commit 6fd99d9

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build benchmark container
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- docker
7+
jobs:
8+
build-docker:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v6
16+
with:
17+
repository: ${{ github.event.inputs.repository }}
18+
fetch-depth: 0
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Login to Docker Registry
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.repository_owner }}
28+
password: ${{ secrets.GITHUB_TOKEN}}
29+
30+
- name: Extract metadata for Docker image
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ghcr.io/${{ github.repository_owner }}/miaBench
35+
36+
- name: Build and push Docker image
37+
uses: docker/build-push-action@v6
38+
with:
39+
context: .
40+
file: ./Dockerfile
41+
push: true
42+
tags: ${{ steps.meta.outputs.tags }}
43+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)