-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (46 loc) · 1.41 KB
/
promote-stage.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
45
46
47
48
49
50
name: Promote Stage
run-name: Promote Stage ${{ inputs.stage-id }} to tag ${{ inputs.base-tag-name }} (${{ inputs.dry-run-mode }})
on:
workflow_dispatch:
inputs:
stage-id:
description: 'Stage to promote from (eg "unstable")'
required: true
default: unstable
base-tag-name:
description: 'Base tag name (eg "r3_2-beta2")'
required: true
package-name:
description: 'Package Name Filter (inclusive, optional)'
dry-run-mode:
type: choice
description: 'Mode'
options:
- dry-run
- push-tags
jobs:
promote:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Promote Stage
id: build
env:
GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }}
run: |
set -x
if [ "${{ inputs.dry-run-mode }}" == "push-tags" ]; then
${{ github.workspace }}/.github/scripts/tag-stage.sh \
${{ github.workspace }} \
${{ inputs.stage-id }} \
${{ inputs.base-tag-name }} \
${{ inputs.package-name }}
else
${{ github.workspace }}/.github/scripts/tag-stage.sh \
${{ github.workspace }} \
${{ inputs.stage-id }} \
${{ inputs.base-tag-name }} \
${{ inputs.package-name }} \
dry-run
fi