From 38f21ad8587fd14504acc97953cba7ba676af90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Thu, 30 Jun 2022 13:56:48 +0200 Subject: [PATCH 1/3] Adding new workflow to check if framework branch and PR exist --- .github/workflows/submodulePR.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/submodulePR.yml diff --git a/.github/workflows/submodulePR.yml b/.github/workflows/submodulePR.yml new file mode 100644 index 00000000..656f0630 --- /dev/null +++ b/.github/workflows/submodulePR.yml @@ -0,0 +1,31 @@ +name: Check on framework PR + +on: + pull_request: + branches: [ "master" ] + types: [ "opened", "reopened", "created", "closed", "synchronize"] + + workflow_dispatch: + +permissions: write-all + +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +defaults: + run: + shell: bash + +jobs: + submodules-pr: + runs-on: ubuntu-latest + if: github.head_ref || github.ref_name != 'master' + steps: + - uses: actions/checkout@v3 + #TODO change action branch + - name: Checkout submodules + uses: rest-for-physics/framework/.github/actions/automerge@auto-merge + with: + branch: ${{ env.BRANCH_NAME }} + repository: "rest-for-physics/framework" + token: ${{ secrets.GITHUB_TOKEN }} From 43e297e2c9446a6827b65cd64cbe582ae019a1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Thu, 30 Jun 2022 22:39:46 +0200 Subject: [PATCH 2/3] Update token --- .github/workflows/submodulePR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/submodulePR.yml b/.github/workflows/submodulePR.yml index 656f0630..0a26a3b0 100644 --- a/.github/workflows/submodulePR.yml +++ b/.github/workflows/submodulePR.yml @@ -28,4 +28,4 @@ jobs: with: branch: ${{ env.BRANCH_NAME }} repository: "rest-for-physics/framework" - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.REST_TOKEN }} From 877cbeb1c32dc23cc36f6bed138ca6ab8f097af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Garc=C3=ADa?= <80903717+juanangp@users.noreply.github.com> Date: Mon, 29 Aug 2022 12:24:05 +0200 Subject: [PATCH 3/3] Debugging why workflow cannot be triggered on dispatch --- .github/workflows/submodulePR.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/submodulePR.yml b/.github/workflows/submodulePR.yml index 0a26a3b0..3c1b9dd5 100644 --- a/.github/workflows/submodulePR.yml +++ b/.github/workflows/submodulePR.yml @@ -7,8 +7,6 @@ on: workflow_dispatch: -permissions: write-all - env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }}