Skip to content

Commit a41fe79

Browse files
authored
[github-workflows][release]tag main via dispatch from ci (#368)
1 parent 7503603 commit a41fe79

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/tag.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Tag
2+
3+
on:
4+
repository_dispatch:
5+
types: [tag-main]
6+
7+
workflow_call:
8+
inputs:
9+
seal_commit:
10+
description: 'Seal repo commit to tag'
11+
type: string
12+
required: true
13+
tag_name:
14+
description: 'Tag Name'
15+
type: string
16+
required: true
17+
workflow_dispatch:
18+
inputs:
19+
seal_commit:
20+
description: 'Seal repo commit to tag'
21+
type: string
22+
required: true
23+
tag_name:
24+
description: 'Tag Name'
25+
type: string
26+
required: true
27+
28+
permissions:
29+
contents: write
30+
31+
env:
32+
SEAL_COMMIT: "${{ github.event.client_payload.seal_commit || inputs.seal_commit }}"
33+
TAG_NAME: "${{ github.event.client_payload.tag_name || inputs.tag_name }}"
34+
35+
jobs:
36+
tag:
37+
name: Tag
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
43+
with:
44+
fetch-depth: 1
45+
ref: ${{ env.SEAL_COMMIT }}
46+
47+
- name: Tag
48+
run: |
49+
git config user.name "github-actions[bot]"
50+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
51+
git tag -f "${{ env.TAG_NAME }}" "${{ env.SEAL_COMMIT }}"
52+
git push origin -f "${{ env.TAG_NAME }}"
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)