Skip to content

Commit 5718a4c

Browse files
committed
chore: Revert release trigger logic
1 parent b780438 commit 5718a4c

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: Version to release (in the format v*).
8-
type: string
9-
required: true
10-
latest:
11-
description: If this should be the latest release.
12-
required: false
13-
type: boolean
14-
default: true
4+
push:
5+
tags:
6+
- v*
157

168
jobs:
179
release:
@@ -100,7 +92,7 @@ jobs:
10092
labels: |
10193
org.opencontainers.image.description=Fluentd aggregator OCI image based on the default Fluentd OCI image.
10294
org.opencontainers.image.authors=Steve Hipwell <[email protected]>
103-
org.opencontainers.image.version=${{ inputs.version }}
95+
org.opencontainers.image.version=${{ github.ref_name }}
10496
10597
- name: Login to GitHub Container Registry
10698
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
@@ -206,7 +198,7 @@ jobs:
206198
sha_tag="${{ steps.metadata.outputs.version }}"
207199
digest="${{ steps.build.outputs.digest }}"
208200
209-
version="$(echo "${{ inputs.version }}" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')"
201+
version="$(echo "${{ github.ref_name }}" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')"
210202
major_minor="$(echo "${version}" | grep -Eo '^[0-9]+\.[0-9]+')"
211203
major="$(echo "${major_minor}" | grep -Eo '^[0-9]+')"
212204
@@ -276,14 +268,12 @@ jobs:
276268
uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2
277269
with:
278270
path: ./CHANGELOG.md
279-
version: ${{ inputs.version }}
271+
version: ${{ github.ref_name }}
280272

281273
- name: Create release
282274
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
283275
with:
284276
token: ${{ secrets.GITHUB_TOKEN }}
285-
commit: ${{ github.sha }}
286-
tag: ${{ inputs.version }}
287-
makeLatest: ${{ inputs.latest }}
277+
makeLatest: true
288278
body: ${{ steps.changelog_reader.outputs.changes }}
289279
allowUpdates: true

0 commit comments

Comments
 (0)