Skip to content

Commit 93d129b

Browse files
committed
ci: trigger packaging repo promote on tag release
When a new upstream tag (v*) is pushed to this repository, automatically trigger the Promote New Upstream Version workflow (Suites) in the packaging repository. Signed-off-by: Renjiang Han <renjiang@qti.qualcomm.com>
1 parent 4101338 commit 93d129b

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Trigger Package Promote on Tag Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Matches tags like v1.0.10, v1.1.0, etc.
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
trigger-promote:
13+
name: Trigger Promote New Upstream Version in packaging repo
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Trigger Promote New Upstream Version (Suites)
17+
uses: actions/github-script@v7
18+
with:
19+
github-token: ${{ secrets.DEB_PKG_BOT_CI_TOKEN }}
20+
script: |
21+
const tag = context.ref.replace('refs/tags/', '');
22+
console.log(`New upstream tag detected: ${tag}`);
23+
24+
const pkgRepo = '${{ vars.PKG_REPO_GITHUB_NAME }}';
25+
const [owner, repo] = pkgRepo.split('/');
26+
27+
// Trigger promote-upstream-suites.yml which promotes all three
28+
// packaging suites (qcom/debian/latest, qcom/debian/trixie,
29+
// qcom/ubuntu/resolute) in a single workflow run.
30+
// The ref must point to the branch that contains the workflow file.
31+
// promote-upstream-suites.yml lives on the 'main' branch of
32+
// pkg-video-driver (the default/control branch).
33+
await github.rest.actions.createWorkflowDispatch({
34+
owner: owner,
35+
repo: repo,
36+
workflow_id: 'promote-upstream-suites.yml',
37+
ref: 'main',
38+
inputs: {
39+
'upstream-tag': tag
40+
}
41+
});
42+
console.log(`Successfully triggered Promote New Upstream Version (Suites) for tag: ${tag} in ${pkgRepo}`);

0 commit comments

Comments
 (0)