File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 99jobs :
1010 build :
1111 runs-on : ubuntu-latest
12- env :
13- VERSION : $(cat .version)
1412 steps :
1513 - name : Checkout code
1614 uses : actions/checkout@v4
2018 with :
2119 username : ${{ secrets.DOCKERHUB_USERNAME }}
2220 password : ${{ secrets.DOCKERHUB_TOKEN }}
21+
22+ - name : Get version
23+ run : |
24+ VERSION=$(cat ${{ github.workspace }}/.version)
25+ echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
2326
2427 - name : Build and push Backend
2528 uses : docker/build-push-action@v5
2831 file : deploy/Dockerfile-BE
2932 platforms : linux/amd64,linux/arm64
3033 push : true
31- tags : ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-backend:${{ env.VERSION }}, ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-backend:latest
34+ tags : |
35+ ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-backend:${{ env.IMAGE_VERSION }}
36+ ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-backend:latest
3237
3338 - name : Build and push Frontend
3439 uses : docker/build-push-action@v5
3742 file : deploy/Dockerfile-FE
3843 platforms : linux/amd64,linux/arm64
3944 push : true
40- tags : ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-frontend:${{ env.VERSION }}, ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-frontend:latest
45+ tags : |
46+ ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-frontend:${{ env.IMAGE_VERSION }}
47+ ${{ secrets.DOCKERHUB_USERNAME }}/ghostsend-frontend:latest
You can’t perform that action at this time.
0 commit comments