File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Docker image
2+ on :
3+ workflow_dispatch :
4+
5+ env :
6+ REGISTRY : ghcr.io
7+ IMAGE_NAME : ${{ github.repository }}
8+
9+ jobs :
10+ build-and-push-docker-image :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - name : Checkout Elementary
18+ uses : actions/checkout@v4
19+
20+ - name : Set up QEMU for multi-platform support
21+ uses : docker/setup-qemu-action@v3
22+
23+ - name : Set up Docker Buildx for multi-platform support
24+ uses : docker/setup-buildx-action@v3
25+
26+ - name : Log in to the container registry
27+ uses : docker/login-action@v2
28+ with :
29+ registry : ${{ env.REGISTRY }}
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Extract metadata (tags, labels) for Docker
34+ id : meta
35+ uses : docker/metadata-action@v4
36+ with :
37+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
39+ - name : Build and push Docker image
40+ uses : docker/build-push-action@v3
41+ with :
42+ context : .
43+ push : false
44+ platforms : linux/amd64,linux/arm64
45+ tags : ${{ steps.meta.outputs.tags }}
46+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments