File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : build-container.yml
2+ on :
3+ push :
4+ tags :
5+ - ' *.*.*'
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+
10+ permissions :
11+ contents : read
12+ packages : write
13+
14+ steps :
15+ - name : Extract tag name
16+ id : meta
17+ run : |
18+ TAG=${GITHUB_REF#refs/tags/}
19+ echo "tag=$TAG" >> $GITHUB_OUTPUT
20+ - name : Set up QEMU
21+ uses : docker/setup-qemu-action@v4
22+
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v4
25+
26+ - name : Login to GitHub Container Registry
27+ uses : docker/login-action@v3
28+ with :
29+ registry : ghcr.io
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+ - name : Set image name
33+ id : image
34+ run : |
35+ IMAGE=ghcr.io/${{ github.repository }}
36+ echo "image=$IMAGE" >> $GITHUB_OUTPUT
37+
38+ - name : Build and push
39+ uses : docker/build-push-action@v7
40+ with :
41+ push : true
42+ tags : ${{ steps.image.outputs.image }}:latest, ${{ steps.image.outputs.image }}:${{ steps.meta.outputs.tag }}
You can’t perform that action at this time.
0 commit comments