Skip to content

Commit 89c823a

Browse files
authored
Merge pull request #381 from opsmill/wvd-20250429-dispatch-update
add repository dispatch workflow triggering updates in other repos
2 parents 9855534 + 47f3b0f commit 89c823a

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,10 @@ jobs:
8787
secrets: inherit
8888
with:
8989
version: ${{ github.ref_name }}
90+
91+
repository-dispatch:
92+
needs: check_release
93+
uses: ./.github/workflows/repository-dispatch.yml
94+
secrets: inherit
95+
with:
96+
version: ${{ needs.check_release.outputs.version }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# yamllint disable rule:truthy rule:line-length
3+
name: Trigger Infrahub SDK update in other repositories
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
runs-on:
9+
description: "The OS to run the job on"
10+
required: false
11+
default: "ubuntu-22.04"
12+
type: string
13+
version:
14+
type: string
15+
required: false
16+
description: The string to extract semver from.
17+
default: ''
18+
workflow_call:
19+
inputs:
20+
runs-on:
21+
description: "The OS to run the job on"
22+
required: false
23+
default: "ubuntu-22.04"
24+
type: string
25+
version:
26+
type: string
27+
required: false
28+
description: The string to extract semver from.
29+
default: ''
30+
31+
jobs:
32+
repository-dispatch:
33+
runs-on: ubuntu-22.04
34+
strategy:
35+
matrix:
36+
# Either a literal path, or the name of a secret...
37+
repo:
38+
- "opsmill/infrahub-demo-dc-fabric"
39+
- "INFRAHUB_CUSTOMER1_REPOSITORY"
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Repository Dispatch
46+
uses: peter-evans/repository-dispatch@v3
47+
with:
48+
token: ${{ secrets.GH_UPDATE_PACKAGE_OTTO }}
49+
# if matrix.repo contains a slash, use it literally; otherwise look up the secret named by matrix.repo
50+
repository: ${{ contains(matrix.repo, '/') && matrix.repo || secrets[matrix.repo] }}
51+
event-type: trigger-infrahub-sdk-python-update
52+
client-payload: |
53+
{"version":"${{ inputs.version }}"}

0 commit comments

Comments
 (0)