File tree Expand file tree Collapse file tree 1 file changed +1
-31
lines changed
Expand file tree Collapse file tree 1 file changed +1
-31
lines changed Original file line number Diff line number Diff line change 11on :
22 push :
33 branches :
4- - " * "
4+ - " main "
55
66permissions :
77 contents : write
88 pages : write
99 id-token : write
1010
11- env :
12- REGISTRY : ghcr.io
1311
1412jobs :
1513 build :
1614 runs-on : ubuntu-latest
17- if : github.ref == 'refs/heads/main'
1815 steps :
1916 - name : Checkout your repository using git
2017 uses : actions/checkout@v4
3128 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
3229 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
3330 run : npx semantic-release
34-
35- build-docker-image :
36- runs-on : ubuntu-latest
37- steps :
38- - name : Set up QEMU
39- uses : docker/setup-qemu-action@v3
40- - name : Set up Docker Buildx
41- uses : docker/setup-buildx-action@v3
42- - name : Login to GitHub Res
43- uses : docker/login-action@v3
44- with :
45- registry : ${{ env.REGISTRY }}
46- username : ${{ github.actor }}
47- password : ${{ secrets.GITHUB_TOKEN }}
48- - name : Get short SHA
49- id : slug
50- # run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
51- run : echo "SHA8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> "$GITHUB_ENV"
52- - name : Build and push
53- uses : docker/build-push-action@v5
54- with :
55- context : " {{defaultContext}}:hello-world-app"
56- platforms : linux/amd64,linux/arm64
57- push : ${{ github.ref == 'refs/heads/main' && true || false }}
58- tags : |
59- ${{ env.REGISTRY }}/banshee86vr/hello-world:${{ env.SHA8 }}
60- ${{ env.REGISTRY }}/banshee86vr/hello-world:latest
You can’t perform that action at this time.
0 commit comments