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 : Publish to Dockerhub
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+ workflow_dispatch :
8+ inputs :
9+ tags :
10+ description : ' Release Tags'
11+
12+ jobs :
13+ update_dockerhub :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Check out the repo
17+ uses : actions/checkout@v3
18+
19+ - name : Set up QEMU
20+ uses : docker/setup-qemu-action@v3
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Log in to Docker Hub
26+ uses : docker/login-action@v2
27+ with :
28+ username : ${{ secrets.DOCKERHUB_USERNAME }}
29+ password : ${{ secrets.DOCKERHUB_PASS }}
30+
31+ - name : Get latest tag
32+ uses : " WyriHaximus/github-action-get-previous-tag@v1"
33+ id : get-latest-tag
34+ with :
35+ fallback : latest
36+
37+ - name : Build and push Docker image
38+ uses : docker/build-push-action@v3
39+ with :
40+ push : true
41+ tags : payment-demo:${{ github.event.inputs.tags || steps.get-latest-tag.outputs.tag }}
42+ file : Dockerfile
43+ platforms : linux/amd64,linux/arm64
You can’t perform that action at this time.
0 commit comments