From 23af5b9ccaa2667f65571230001848a63942bd7c Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sun, 23 Jun 2024 08:32:26 +0800 Subject: [PATCH] Trigger build of powa-web on new release tag --- .github/workflows/powa_web.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/powa_web.yml diff --git a/.github/workflows/powa_web.yml b/.github/workflows/powa_web.yml new file mode 100644 index 00000000..0e0c18dd --- /dev/null +++ b/.github/workflows/powa_web.yml @@ -0,0 +1,31 @@ +name: Trigger build and push of powa-web 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_REPO: "powa-podman" + EVENT_TYPE: "powa-web" + +jobs: + trigger_build: + name: Trigger build and push of powa-web in powa-podman repo + runs-on: ubuntu-latest + steps: + - name: Trigger the powa-web 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}\"}"