File tree Expand file tree Collapse file tree 1 file changed +42
-2
lines changed
Expand file tree Collapse file tree 1 file changed +42
-2
lines changed Original file line number Diff line number Diff line change 1- name : Release Please
1+ name : Frontend build & release
22
33on :
44 push :
55 branches :
66 - main
7+ workflow_dispatch :
78
89permissions :
910 contents : write
1011 pull-requests : write
1112 issues : write
13+ packages : write
1214
1315jobs :
14- release :
16+ build :
1517 runs-on : ubuntu-latest
18+
1619 steps :
1720 - name : Release PR or GitHub Release
21+ id : release
1822 uses : googleapis/release-please-action@v4
1923 with :
2024 release-type : node
25+
26+ - name : Checkout code
27+ uses : actions/checkout@v4
28+ with :
29+ fetch-depth : 0
30+
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
33+
34+ - name : Extract Docker metadata
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ghcr.io/frikanalen/frontend
39+ tags : |
40+ type=ref,event=branch
41+ type=sha,prefix=sha-,format=short
42+ type=raw,value=latest,enable={{is_default_branch}}
43+ type=raw,value=${{ steps.release.outputs.tag_name }},enable=${{ steps.release.outputs.release_created == 'true' }}
44+
45+ - name : Log in to GHCR
46+ uses : docker/login-action@v3
47+ with :
48+ registry : ghcr.io
49+ username : ${{ github.actor }}
50+ password : ${{ secrets.GITHUB_TOKEN }}
51+
52+ - name : Build and push
53+ uses : docker/build-push-action@v5
54+ with :
55+ context : .
56+ push : true
57+ tags : ${{ steps.meta.outputs.tags }}
58+ labels : ${{ steps.meta.outputs.labels }}
59+ cache-from : type=gha
60+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments