File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Publish Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - " v*"
9+ pull_request :
10+
11+ jobs :
12+ publish :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+
19+ - name : Extract Docker image metadata
20+ id : meta
21+ uses : docker/metadata-action@v5
22+ with :
23+ images : ${{ vars.DOCKER_USERNAME }}/population-app
24+
25+ - name : Log in to Docker Hub
26+ uses : docker/login-action@v3
27+ with :
28+ username : ${{ vars.DOCKER_USERNAME }}
29+ password : ${{ secrets.DOCKER_TOKEN }}
30+
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
33+
34+ - name : Build and push
35+ uses : docker/build-push-action@v6
36+ with :
37+ push : ${{ github.event_name != 'pull_request' }}
38+ tags : ${{ steps.meta.outputs.tags }}
39+ annotations : ${{ steps.meta.outputs.annotations }}
40+ provenance : true
41+ sbom : true
You can’t perform that action at this time.
0 commit comments