-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.26 KB
/
update-main-version.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
name: Update main release version
run-name: Move ${{ github.event.inputs.main_version }} to ${{ github.event.inputs.target }}
on:
workflow_dispatch:
inputs:
target:
description: The tag of the target version which should be used as the new main version
required: true
main_version:
type: choice
description: The main version to update
options:
- v1
jobs:
move-version:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required since we need to ensure all tags are contained within the checkout.
token: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}
- name: Setup GitSign
uses: chainguard-dev/actions/setup-gitsign@main
- name: Move main version tag
run: |
git config --global user.email ${{ secrets.RHACS_BOT_GITHUB_EMAIL }}
git config --global user.name ${{ secrets.RHACS_BOT_GITHUB_USERNAME }}
# Move the main version tag to the target tag.
git tag -m "" -s -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.target }}
git push origin ${{ github.event.inputs.main_version }} --force --tags