Skip to content

Commit 6f4df3c

Browse files
committed
do a release
1 parent 260b2be commit 6f4df3c

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.github/workflows/release.yaml

+21-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
name: release
22

33
on:
4-
create
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'main'
8+
tags:
9+
- 'v*'
10+
pull_request:
11+
branches:
12+
- 'main'
513

614
jobs:
715
docker:
8-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
916
runs-on: ubuntu-latest
1017
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}}
1726
-
1827
name: Login to Docker Hub
28+
if: github.event_name != 'pull_request'
1929
uses: docker/login-action@v3
2030
with:
2131
username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -24,5 +34,6 @@ jobs:
2434
name: Build and push
2535
uses: docker/build-push-action@v5
2636
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 }}

0 commit comments

Comments
 (0)