File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed
Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change 2525 uses : docker/setup-buildx-action@v1
2626
2727 - name : Set Version
28- run : echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
28+ run : |
29+ GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
30+ echo "VERSION=$(cat VERSION).$GIT_HASH" >> $GITHUB_ENV
31+ echo "APP_VERSION=$(cut -d'-' -f 1 VERSION)" >> $GITHUB_ENV
2932
3033 - name : Build and Push
3134 uses : docker/build-push-action@v2
3437 file : ./Dockerfile
3538 builder : ${{ steps.buildx.outputs.name }}
3639 push : ${{ github.event_name != 'pull_request' }}
37- args : VERSION=${{ env.VERSION }}
40+ build- args : VERSION=${{ env.APP_VERSION }}
3841 tags : |
3942 ${{ secrets.DOCKER_HUB_USERNAME }}/multi-downloader-nx:latest
4043 ${{ secrets.DOCKER_HUB_USERNAME }}/multi-downloader-nx:${{ env.VERSION }}
Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - " *.*.*"
9+
10+ jobs :
11+ ci :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v2
16+
17+ - name : Login to Dockerhub
18+ uses : docker/login-action@v1
19+ with :
20+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
21+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
22+
23+ - name : Setup Docker Buildx
24+ uses : docker/setup-buildx-action@v1
25+
26+ - name : Set Version
27+ run : |
28+ TAG=${GITHUB_REF#refs/tags/}
29+ echo "VERSION=$TAG" >> $GITHUB_ENV
30+ echo "APP_VERSION=$(echo $TAG | cut -d'-' -f 1)" >> $GITHUB_ENV
31+
32+ - name : Build and Push
33+ uses : docker/build-push-action@v2
34+ with :
35+ context : .
36+ file : ./Dockerfile
37+ builder : ${{ steps.buildx.outputs.name }}
38+ push : true
39+ build-args : VERSION=${{ env.APP_VERSION }}
40+ tags : |
41+ ${{ secrets.DOCKER_HUB_USERNAME }}/multi-downloader-nx:latest
42+ ${{ secrets.DOCKER_HUB_USERNAME }}/multi-downloader-nx:${{ env.VERSION }}
43+ cache-from : type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/multi-downloader-nx:buildcache
44+ cache-to : type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/multi-downloader-nx:buildcache,mode=max
Original file line number Diff line number Diff line change 1- 2.0.18
1+ 2.0.18-d0
You can’t perform that action at this time.
0 commit comments