@@ -2,19 +2,19 @@ name: Docker Build
22
33on :
44 schedule :
5- - cron : ' 42 7 * * *'
5+ - cron : " 42 7 * * *"
66 push :
7- branches : [ "main" ]
8- tags : [ ' v*.*.*' ]
7+ branches : ["main"]
8+ tags : [" v*.*.*" ]
99 pull_request :
10- branches : [ "main" ]
10+ branches : ["main"]
1111
1212env :
1313 REGISTRY : ghcr.io
1414 IMAGE_NAME : ${{ github.repository }}
1515
1616jobs :
17- build-backend :
17+ build :
1818 runs-on : ubuntu-latest
1919 permissions :
2020 contents : read
2929 if : github.event_name != 'pull_request'
3030 uses : sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6
3131 with :
32- cosign-release : ' v1.11.0'
32+ cosign-release : " v1.11.0"
3333
3434 - name : Setup Docker buildx
3535 uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
@@ -46,56 +46,16 @@ jobs:
4646 id : meta
4747 uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
4848 with :
49- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend
49+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5050
5151 - name : Build and push Docker image
5252 id : build-and-push
5353 uses : docker/build-push-action@v4
5454 with :
5555 context : .
56- file : ./Dockerfile-backend
56+ file : ./Dockerfile
5757 push : ${{ github.event_name != 'pull_request' }}
5858 tags : ${{ steps.meta.outputs.tags }}
5959 labels : ${{ steps.meta.outputs.labels }}
6060 cache-from : type=gha
6161 cache-to : type=gha,mode=max
62-
63- build-frontend :
64- runs-on : ubuntu-latest
65- permissions :
66- contents : read
67- packages : write
68- id-token : write
69-
70- steps :
71- - name : Checkout repository
72- uses : actions/checkout@v3
73-
74- - name : Setup Docker buildx
75- uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
76-
77- - name : Log into registry ${{ env.REGISTRY }}
78- if : github.event_name != 'pull_request'
79- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
80- with :
81- registry : ${{ env.REGISTRY }}
82- username : ${{ github.actor }}
83- password : ${{ secrets.GITHUB_TOKEN }}
84-
85- - name : Extract Docker metadata for frontend
86- id : meta-frontend
87- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
88- with :
89- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend
90-
91- - name : Build and push frontend Docker image
92- id : build-and-push-frontend
93- uses : docker/build-push-action@v4
94- with :
95- context : ./frontend
96- file : ./frontend/Dockerfile
97- push : ${{ github.event_name != 'pull_request' }}
98- tags : ${{ steps.meta-frontend.outputs.tags }}
99- labels : ${{ steps.meta-frontend.outputs.labels }}
100- cache-from : type=gha
101- cache-to : type=gha,mode=max
0 commit comments