From ea063fec421b5f9907c411032a78d388828fd304 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sun, 30 Jun 2024 09:24:47 +0800 Subject: [PATCH] Automatically trigger build of powa-archivist-git --- .github/workflows/powa_archivist_git.yml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/powa_archivist_git.yml diff --git a/.github/workflows/powa_archivist_git.yml b/.github/workflows/powa_archivist_git.yml new file mode 100644 index 0000000..0790d1d --- /dev/null +++ b/.github/workflows/powa_archivist_git.yml @@ -0,0 +1,30 @@ +name: Trigger build and push of powa-archivist-git image + +on: + push: + branches: [REL1_STABLE] + +env: + TARGET_ORG: "powa-team" + TARGET_REPO: "powa-podman" + EVENT_TYPE: "powa-archivist-git" + +jobs: + trigger_build: + name: Trigger build and push of powa-archivist-git 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}\"}"