Skip to content

Commit fd4774d

Browse files
authored
Trigger pipeline build when a release tag is pushed (#4741)
1 parent 34e88f3 commit fd4774d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/post-release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Post-release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
post-release:
10+
runs-on: ubuntu-latest
11+
# Skip in forks
12+
if: github.repository == 'element-hq/element-x-android'
13+
14+
steps:
15+
- name: Trigger pipeline
16+
uses: actions/github-script@v7
17+
with:
18+
github-token: ${{ secrets.ENTERPRISE_ACTIONS_TOKEN }}
19+
script: |
20+
const tag = context.ref.replace('refs/tags/', '');
21+
const inputs = { git_tag: tag };
22+
await github.rest.actions.createWorkflowDispatch({
23+
owner: 'element-hq',
24+
repo: 'element-enterprise',
25+
workflow_id: 'pipeline-android.yml',
26+
ref: 'main',
27+
inputs: inputs
28+
});

0 commit comments

Comments
 (0)