File tree Expand file tree Collapse file tree 2 files changed +28
-5
lines changed
Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 11name : Docker build (version + latest)
2+
23on :
3- push : { tags: 'v[0-9]+.[0-9]+.[0-9]+' }
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : Tag to build
8+ required : true
9+ default : ' 0.6.3'
10+
11+ push :
12+ tags :
13+ - ' v[0-9]+.[0-9]+.[0-9]+'
414
515jobs :
616 docker :
717 runs-on : ubuntu-latest
18+
819 steps :
920 - name : Checkout
1021 uses : actions/checkout@v4
22+
1123 - name : Extract tag
12- run : echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
24+ if : github.event_name == 'push'
25+ run : echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
26+
27+ - name : Set tag from input
28+ if : github.event_name == 'workflow_dispatch'
29+ run : echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
30+
1331 - name : Set up QEMU
1432 uses : docker/setup-qemu-action@v3
33+
1534 - name : Set up Docker Buildx
1635 uses : docker/setup-buildx-action@v3
36+
1737 - name : Login to Docker Hub
1838 uses : docker/login-action@v3
1939 with :
2040 username : ${{ secrets.DOCKERHUB_USERNAME }}
2141 password : ${{ secrets.DOCKERHUB_TOKEN }}
42+
2243 - name : Build and push
23- uses : docker/build-push-action@v5
44+ uses : docker/build-push-action@v6
2445 with :
2546 context : .
2647 platforms : linux/amd64,linux/arm64
2748 push : true
28- tags : dannyben/completely,dannyben/completely:${{ env.TAG }}
49+ tags : |
50+ dannyben/completely
51+ dannyben/completely:${{ env.TAG }}
Original file line number Diff line number Diff line change 1- FROM dannyben/alpine-ruby
1+ FROM dannyben/alpine-ruby:3.3.3
22
33ENV PS1 "\n\n >> completely \W \$ "
44WORKDIR /app
You can’t perform that action at this time.
0 commit comments