-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger build of powa-collector on new release tag
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Trigger build and push of powa-collector image | ||
|
||
on: | ||
push: | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
tags-ignore: | ||
- 'debian/*' | ||
|
||
env: | ||
TARGET_REPO: "powa-podman" | ||
EVENT_TYPE: "powa-collector" | ||
|
||
jobs: | ||
trigger_build: | ||
name: Trigger build and push of powa-collector in powa-podman repo | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger the powa-collector-git repository dispatch | ||
run: | | ||
# Set variables | ||
org="${{ github.repository_owner }}" | ||
repo="${{ env.TARGET_REPO }}" | ||
event_type="${{ env.EVENT_TYPE }}" | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${org}/${repo}/dispatches \ | ||
-d "{\"event_type\": \"${event_type}\"}" |