|
1 | 1 | name: Release
|
2 | 2 |
|
3 | 3 | 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* |
15 | 7 |
|
16 | 8 | jobs:
|
17 | 9 | release:
|
|
100 | 92 | labels: |
|
101 | 93 | org.opencontainers.image.description=Fluentd aggregator OCI image based on the default Fluentd OCI image.
|
102 | 94 | org.opencontainers.image.authors=Steve Hipwell <[email protected]>
|
103 |
| - org.opencontainers.image.version=${{ inputs.version }} |
| 95 | + org.opencontainers.image.version=${{ github.ref_name }} |
104 | 96 |
|
105 | 97 | - name: Login to GitHub Container Registry
|
106 | 98 | uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
|
@@ -206,7 +198,7 @@ jobs:
|
206 | 198 | sha_tag="${{ steps.metadata.outputs.version }}"
|
207 | 199 | digest="${{ steps.build.outputs.digest }}"
|
208 | 200 |
|
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]+')" |
210 | 202 | major_minor="$(echo "${version}" | grep -Eo '^[0-9]+\.[0-9]+')"
|
211 | 203 | major="$(echo "${major_minor}" | grep -Eo '^[0-9]+')"
|
212 | 204 |
|
@@ -276,14 +268,12 @@ jobs:
|
276 | 268 | uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2
|
277 | 269 | with:
|
278 | 270 | path: ./CHANGELOG.md
|
279 |
| - version: ${{ inputs.version }} |
| 271 | + version: ${{ github.ref_name }} |
280 | 272 |
|
281 | 273 | - name: Create release
|
282 | 274 | uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
|
283 | 275 | with:
|
284 | 276 | token: ${{ secrets.GITHUB_TOKEN }}
|
285 |
| - commit: ${{ github.sha }} |
286 |
| - tag: ${{ inputs.version }} |
287 |
| - makeLatest: ${{ inputs.latest }} |
| 277 | + makeLatest: true |
288 | 278 | body: ${{ steps.changelog_reader.outputs.changes }}
|
289 | 279 | allowUpdates: true
|
0 commit comments