From cbcd886c0099fc04d438a36476437934525ffbda Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Tue, 12 Jul 2022 12:05:13 -0600 Subject: [PATCH] ci(.github): add dispatch.yml Signed-off-by: Vaughn Dice --- .github/workflows/dispatch.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/dispatch.yml diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml new file mode 100644 index 00000000..96f2b28e --- /dev/null +++ b/.github/workflows/dispatch.yml @@ -0,0 +1,36 @@ +name: Dispatch Event + +on: + push: + branches: [main, "v*"] + tags: ["v*"] + +jobs: + changes: + name: Detect files changed + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'fermyon' }} + outputs: + docs: ${{ steps.filter.outputs.docs }} + steps: + - uses: actions/checkout@v2 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + docs: + - 'docs/**' + + dispatch: + name: Dispatch bartholomew-docs-updated event + needs: changes + if: ${{ needs.changes.outputs.docs == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.DEST_REPO_ACCESS_TOKEN }} + repository: ${{ secrets.DEST_REPO }} + event-type: bartholomew-docs-updated + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' \ No newline at end of file