From 9b6f12b6c480d79be9a01a4c5bd14d9763b9fe74 Mon Sep 17 00:00:00 2001 From: je-cook <81617086+je-cook@users.noreply.github.com> Date: Tue, 14 May 2024 15:53:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Fix=20make=20release=20(#3276)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/dependencies_PR/action.yml | 8 ++++++-- .../actions/permission_check/action.yml | 17 ++++++++--------- .github/workflows/dependencies_pr.yml | 9 +++++---- .github/workflows/release.yml | 8 ++++---- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/actions/dependencies_PR/action.yml b/.github/workflows/actions/dependencies_PR/action.yml index 2b7a703bfd..fc2c5a506e 100644 --- a/.github/workflows/actions/dependencies_PR/action.yml +++ b/.github/workflows/actions/dependencies_PR/action.yml @@ -10,10 +10,11 @@ inputs: runs: using: "composite" - env: - GITHUB_TOKEN: ${{ inputs.token }} steps: - name: Rebase develop_dependencies + env: + GITHUB_TOKEN: ${{ inputs.token }} + shell: bash -l {0} run: | # Rebase develop_dependencies on develop, so that it's up-to-date and # we don't run into conflicts next time we merge. @@ -23,6 +24,9 @@ runs: git push --force-with-lease origin develop_dependencies:develop_dependencies - name: Create PR to update dependencies + env: + GITHUB_TOKEN: ${{ inputs.token }} + shell: bash -l {0} run: | PR_URL=$(gh pr create \ --head develop_dependencies \ diff --git a/.github/workflows/actions/permission_check/action.yml b/.github/workflows/actions/permission_check/action.yml index e74b26e9aa..603880cb02 100644 --- a/.github/workflows/actions/permission_check/action.yml +++ b/.github/workflows/actions/permission_check/action.yml @@ -6,15 +6,14 @@ inputs: type: string -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Permissions Test - env: - GITHUB_TOKEN: ${{ inputs.token }} - shell: bash - run: | +runs: + using: "composite" + steps: + - name: Permissions Test + env: + GITHUB_TOKEN: ${{ inputs.token }} + shell: bash + run: | role_type="$(gh api /orgs/${{ github.repository_owner }}/memberships/${{ github.actor }} --jq '.role')" if [[ $role_type != 'admin' ]]; then exit 1 diff --git a/.github/workflows/dependencies_pr.yml b/.github/workflows/dependencies_pr.yml index 0df95b1a79..ee04fbae13 100644 --- a/.github/workflows/dependencies_pr.yml +++ b/.github/workflows/dependencies_pr.yml @@ -10,15 +10,16 @@ on: jobs: dep_pr: + runs-on: ubuntu-latest steps: - - name: Permissions Check - uses: ./.github/workflows/actions/permission_check - with: - token: ${{ secrets.FPPF_BOT_AUTH_KEY }} - name: Checkout uses: actions/checkout@v4 with: token: ${{ secrets.FPPF_BOT_AUTH_KEY }} + - name: Permissions Check + uses: ./.github/workflows/actions/permission_check + with: + token: ${{ secrets.FPPF_BOT_AUTH_KEY }} - name: Open develop_dependencies PR uses: ./.github/workflows/actions/dependencies_PR with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2b40442fd..dfe15d6520 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,13 +28,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Permissions Check - uses: ./.github/workflows/actions/permission_check + - name: Checkout + uses: actions/checkout@v4 with: token: ${{ secrets.FPPF_BOT_AUTH_KEY }} - - name: Checkout - uses: actions/checkout@v4 + - name: Permissions Check + uses: ./.github/workflows/actions/permission_check with: token: ${{ secrets.FPPF_BOT_AUTH_KEY }}