File tree 1 file changed +21
-10
lines changed
1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : release
2
2
3
3
on :
4
- create
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - ' main'
8
+ tags :
9
+ - ' v*'
10
+ pull_request :
11
+ branches :
12
+ - ' main'
5
13
6
14
jobs :
7
15
docker :
8
- if : ${{ startsWith(github.ref, 'refs/tags/v') }}
9
16
runs-on : ubuntu-latest
10
17
steps :
11
- -
12
- name : Set up QEMU
13
- uses : docker/setup-qemu-action@v3
14
- -
15
- name : Set up Docker Buildx
16
- uses : docker/setup-buildx-action@v3
18
+ - name : Docker meta
19
+ id : meta
20
+ uses : docker/metadata-action@v5
21
+ with :
22
+ images : hakindazz/s6-cli
23
+ tags : |
24
+ # set latest tag for default branch
25
+ type=raw,value=latest,enable={{is_default_branch}}
17
26
-
18
27
name : Login to Docker Hub
28
+ if : github.event_name != 'pull_request'
19
29
uses : docker/login-action@v3
20
30
with :
21
31
username : ${{ secrets.DOCKERHUB_USERNAME }}
24
34
name : Build and push
25
35
uses : docker/build-push-action@v5
26
36
with :
27
- push : true
28
- tags : hakindazz/s6-cli:latest
37
+ push : ${{ github.event_name != 'pull_request' }}
38
+ tags : ${{ steps.meta.outputs.tags }}
39
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments