Skip to content

Commit 7c5824f

Browse files
ci: trigger ansible collection build on release
1 parent ec1ede1 commit 7c5824f

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
matrix:
2727
include:
2828
# Note: The first item in this matrix must use env.DEFAULT_PFSENSE_VERSION as the PFSENSE_VERSION!
29-
3029
- FREEBSD_VERSION: FreeBSD-15.0-CURRENT
3130
PFSENSE_VERSION: "2.8.1"
3231
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
@@ -118,6 +117,28 @@ jobs:
118117
name: schema.graphql
119118
path: schema.graphql
120119

120+
trigger_ansible_collection_build:
121+
runs-on: ubuntu-latest
122+
needs: [release_pkg]
123+
steps:
124+
- name: Generate pfrest-automation GitHub App token
125+
id: app_token
126+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
127+
with:
128+
app-id: ${{ secrets.PFREST_AUTOMATION_APP_ID }}
129+
private-key: ${{ secrets.PFREST_AUTOMATION_PRIVATE_KEY }}
130+
owner: pfrest
131+
repositories: ansible-collection-pfsense
132+
133+
- name: Trigger ansible-collection-pfrest generate workflow
134+
run: |
135+
curl -s -X POST \
136+
-H "Authorization: Bearer ${{ steps.app_token.outputs.token }}" \
137+
-H "Accept: application/vnd.github+json" \
138+
-H "X-GitHub-Api-Version: 2022-11-28" \
139+
https://api.github.com/repos/pfrest/ansible-collection-pfrest/dispatches \
140+
-d '{"event_type":"pfSense-pkg-RESTAPI-release"}'
141+
121142
release_docs:
122143
needs: [build_schemas]
123144
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)