File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 8
8
required : true
9
9
default : ' 1.2.2'
10
10
11
- push : { tags: 'v[0-9]+.[0-9]+.[0-9]+' }
11
+ push :
12
+ tags :
13
+ - ' v[0-9]+.[0-9]+.[0-9]+'
12
14
13
15
jobs :
14
16
docker :
15
17
runs-on : ubuntu-latest
18
+
16
19
steps :
17
20
- name : Checkout
18
21
uses : actions/checkout@v4
22
+
19
23
- name : Extract tag
20
- 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
+
21
31
- name : Set up QEMU
22
32
uses : docker/setup-qemu-action@v3
33
+
23
34
- name : Set up Docker Buildx
24
35
uses : docker/setup-buildx-action@v3
36
+
25
37
- name : Login to Docker Hub
26
38
uses : docker/login-action@v3
27
39
with :
28
40
username : ${{ secrets.DOCKERHUB_USERNAME }}
29
41
password : ${{ secrets.DOCKERHUB_TOKEN }}
42
+
30
43
- name : Build and push
31
44
uses : docker/build-push-action@v5
32
45
with :
33
46
context : .
34
47
platforms : linux/amd64,linux/arm64
35
48
push : true
36
- tags : dannyben/bashly,dannyben/bashly:${{ env.TAG }}
49
+ tags : |
50
+ dannyben/bashly
51
+ dannyben/bashly:${{ env.TAG }}
You can’t perform that action at this time.
0 commit comments