From 23d5ea08f47b08da750942c713f7118132efe897 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sun, 16 Jun 2024 10:11:14 +0800 Subject: [PATCH] Automatically trigger build of powa-web-git image --- .github/workflows/powa_web_git.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/powa_web_git.yml diff --git a/.github/workflows/powa_web_git.yml b/.github/workflows/powa_web_git.yml new file mode 100644 index 00000000..ebb9c38a --- /dev/null +++ b/.github/workflows/powa_web_git.yml @@ -0,0 +1,29 @@ +name: Trigger build and push of powa-web-git image + +on: + push: + branches: [master] + +env: + TARGET_REPO: "powa-podman" + EVENT_TYPE: "powa-web-git" + +jobs: + trigger_build: + name: Trigger build and push of powa-web-git in powa-podman repo + runs-on: ubuntu-latest + steps: + - name: Trigger the powa-web-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}\"}"