From 8da5b019202ad6fc6c4d6bd07947814d0b2e251a Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sat, 7 Mar 2020 21:09:16 +0100 Subject: [PATCH 1/6] Create scripts.yml --- .github/workflows/scripts.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/scripts.yml diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml new file mode 100644 index 00000000000000..0eaec9af5d933c --- /dev/null +++ b/.github/workflows/scripts.yml @@ -0,0 +1,21 @@ +# workflow for communication with eps1lon/mui-scripts-incubator +# These scripts are experimental. We have a very "dumb" workflow here that is only responsible for triggering +# actions in eps1lon/mui-scripts-incubator. Since those actions are experimental they'll likely break +# and we don't want to disrupt the normal repo workflow. +name: CI +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Find PR associated with this push + uses: jwalton/gh-find-current-pr@v1 + id: findPr + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Run mui-scripts a11y-snapshot + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.MUI_SCRIPTS_INCUBATOR }} + event-type: a11y-snapshot + client-payload: '{ "pr_number": "${{ steps.findPr.outputs.pr }}"}' From b918ca13ac47af231ada6cde9fe341c72705086f Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sat, 7 Mar 2020 21:19:20 +0100 Subject: [PATCH 2/6] Update scripts.yml --- .github/workflows/scripts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 0eaec9af5d933c..793252cd4e3da6 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -2,7 +2,7 @@ # These scripts are experimental. We have a very "dumb" workflow here that is only responsible for triggering # actions in eps1lon/mui-scripts-incubator. Since those actions are experimental they'll likely break # and we don't want to disrupt the normal repo workflow. -name: CI +name: experimental on: push jobs: build: From 28f821575be08a1e1372b5bbfae4fabebc39c5b0 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sat, 7 Mar 2020 21:21:46 +0100 Subject: [PATCH 3/6] Update scripts.yml --- .github/workflows/scripts.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 793252cd4e3da6..c39e01d23b7b95 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -17,5 +17,6 @@ jobs: uses: peter-evans/repository-dispatch@v1 with: token: ${{ secrets.MUI_SCRIPTS_INCUBATOR }} + repository: eps1lon/mui-scripts-incubator event-type: a11y-snapshot client-payload: '{ "pr_number": "${{ steps.findPr.outputs.pr }}"}' From 903e559b9f5d6f5c418759cd5b2ee1ebb5750708 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sat, 7 Mar 2020 21:41:41 +0100 Subject: [PATCH 4/6] Update scripts.yml --- .github/workflows/scripts.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index c39e01d23b7b95..5b6c5abb8cd7d5 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -3,11 +3,17 @@ # actions in eps1lon/mui-scripts-incubator. Since those actions are experimental they'll likely break # and we don't want to disrupt the normal repo workflow. name: experimental -on: push +on: status jobs: build: + if: github.event.state == 'success' runs-on: ubuntu-latest steps: + - name: debug + run: | + echo ${{ github.event.sender }} + echo ${{ github.event.name }} + echo ${{ github.event.description }} - name: Find PR associated with this push uses: jwalton/gh-find-current-pr@v1 id: findPr From 5300b63f31c55dd6a731fdffbe4567f6f425ecf5 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sat, 7 Mar 2020 21:46:58 +0100 Subject: [PATCH 5/6] debug why it's not runngin --- .github/workflows/scripts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index 5b6c5abb8cd7d5..a4ddb4e38f5304 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -6,11 +6,11 @@ name: experimental on: status jobs: build: - if: github.event.state == 'success' runs-on: ubuntu-latest steps: - name: debug run: | + echo ${{ github.event.state }} echo ${{ github.event.sender }} echo ${{ github.event.name }} echo ${{ github.event.description }} From 789ef79379a794bb0a9635e5b023f9a12c500333 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sat, 7 Mar 2020 22:28:01 +0100 Subject: [PATCH 6/6] Update scripts.yml --- .github/workflows/scripts.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index a4ddb4e38f5304..59bf96483d4997 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -6,14 +6,9 @@ name: experimental on: status jobs: build: + if: github.event.state == 'success' && github.event.sender.login == 'netlify[bot]' && github.event.description == 'Deploy preview ready!' runs-on: ubuntu-latest steps: - - name: debug - run: | - echo ${{ github.event.state }} - echo ${{ github.event.sender }} - echo ${{ github.event.name }} - echo ${{ github.event.description }} - name: Find PR associated with this push uses: jwalton/gh-find-current-pr@v1 id: findPr