-
Notifications
You must be signed in to change notification settings - Fork 23
44 lines (37 loc) · 1.02 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release
concurrency:
group: release-${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
on:
push:
tags:
- 'v[0-9]+.[0-9]+.*'
permissions:
contents: read
packages: write
jobs:
tagList:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.tags.outputs.OUTPUT_TAGS }}
steps:
- name: Get image tag list
id: tags
run: |
set -eux -o pipefail
# Remove leading "v" from tag name
TRIMMED_REF_NAME="${REF_NAME#v}"
# Creates a comma separated list of tags
# - latest
# - <major>.<minor>
# - <major>.<minor>.<patch>
OUTPUT_TAGS="latest,${TRIMMED_REF_NAME%.*},${TRIMMED_REF_NAME}"
echo "OUTPUT_TAGS=${OUTPUT_TAGS}" >> "$GITHUB_OUTPUT" && cat "$GITHUB_OUTPUT"
env:
REF_NAME: ${{ github.ref_name }}
shell: bash
build:
needs: tagList
uses: ./.github/workflows/frontend-image.yml
with:
tag: ${{needs.tagList.outputs.tags}}