File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 11name : Build and Push Docker Image for Helm Client
2+
23on :
34 push :
45 branches :
5- - main
6- pull_request :
7- types : [closed]
6+ - ' v*.*.*'
87
98jobs :
10- build-and-publish-image :
9+ build-and-publish-image :
1110 runs-on : ubuntu-latest
1211 steps :
12+
1313 - name : Checkout
1414 uses : actions/checkout@v3
15+
16+ - name : Extract branch name
17+ shell : bash
18+ run : echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
19+ id : branch_name
20+
1521 - name : Set up QEMU
1622 uses : docker/setup-qemu-action@v2
23+
1724 - name : Set up Docker Buildx
1825 uses : docker/setup-buildx-action@v2
26+
1927 - name : Login to Docker Hub
2028 uses : docker/login-action@v2
2129 with :
2230 username : ${{ secrets.DOCKER_USERNAME }}
2331 password : ${{ secrets.DOCKER_PASSWORD }}
32+
2433 - name : Build and push
2534 uses : docker/build-push-action@v4
2635 with :
2736 push : true
2837 platforms : linux/amd64
29- tags : ${{ secrets.DOCKER_REPO }}/helm-client:latest
30- - name : Update repo description
31- uses : peter-evans/dockerhub-description@v3
32- with :
33- username : ${{ secrets.DOCKER_USERNAME }}
34- password : ${{ secrets.DOCKER_PASSWORD }}
35- repository : ${{ secrets.DOCKER_REPO }}/helm-client
38+ tags : ${{ secrets.DOCKER_REPO }}/helm-client:${{ steps.branch_name.outputs.branch }}
You can’t perform that action at this time.
0 commit comments