Trigger build of powa-archivist on new release tag

This commit is contained in:
Julien Rouhaud 2024-06-30 09:27:34 +08:00
parent ea063fec42
commit 5fdf0ef8c0

32
.github/workflows/powa_archivist.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Trigger build and push of powa-archivist image
on:
push:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
tags-ignore:
- 'debian/*'
env:
TARGET_ORG: "powa-team"
TARGET_REPO: "powa-podman"
EVENT_TYPE: "powa-archivist"
jobs:
trigger_build:
name: Trigger build and push of powa-archivist in powa-podman repo
runs-on: ubuntu-latest
steps:
- name: Trigger the powa-archivist-git repository dispatch
run: |
# Set variables
org="${{ env.TARGET_ORG }}"
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}\"}"