File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Image Release
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - " v*.*.*"
9+
10+ permissions :
11+ contents : read
12+
13+ jobs :
14+ docker-release :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Determine image tag
24+ run : |
25+ if [ "${{ github.event_name }}" == "workflow_dispatch" ] || [ "${{ github.ref }}" == "refs/heads/main" ]; then
26+ echo "TAG=latest" >> $GITHUB_ENV
27+ else
28+ echo "TAG=${{ github.ref_name }}" >> $GITHUB_ENV
29+ fi
30+
31+ - name : Login to DockerHub
32+ uses : docker/login-action@v3
33+ with :
34+ username : ${{ secrets.DOCKERHUB_USERNAME }}
35+ password : ${{ secrets.DOCKERHUB_TOKEN }}
36+
37+ - name : Build and push frontend image
38+ uses : docker/build-push-action@v5
39+ with :
40+ context : .
41+ file : ./deployment/build/frontend/Dockerfile
42+ push : true
43+ tags : volcanosh/vc-dashboard-frontend:${{ env.TAG }}
44+ platforms : linux/amd64,linux/arm64
45+
46+ - name : Build and push backend image
47+ uses : docker/build-push-action@v5
48+ with :
49+ context : .
50+ file : ./deployment/build/backend/Dockerfile
51+ push : true
52+ tags : volcanosh/vc-dashboard-backend:${{ env.TAG }}
53+ platforms : linux/amd64,linux/arm64
54+
55+ - name : Logout from Docker Hub
56+ if : always()
57+ run : docker logout
You can’t perform that action at this time.
0 commit comments