From b9604f526afb83b2c6bec69e9ca55d0a13d54573 Mon Sep 17 00:00:00 2001 From: AntoinePrv Date: Mon, 30 Oct 2023 17:02:07 +0100 Subject: [PATCH] Try setting github token differently --- .github/actions/workspace/action.yml | 17 +++++++++++++---- .github/workflows/unix.yml | 7 ++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/actions/workspace/action.yml b/.github/actions/workspace/action.yml index 5af355f50c..9c504ab1eb 100644 --- a/.github/actions/workspace/action.yml +++ b/.github/actions/workspace/action.yml @@ -14,7 +14,11 @@ inputs: required: true key: required: true - default: ${{github.workflow}}-${{ runner.os }}-${{ github.sha }} + # default: ${{ github.workflow }}-${{ runner.os }}-${{ github.sha }} + default: ${{ runner.os }}-${{ github.sha }} + token: + required: false + default: ${{ github.token }} runs: using: "composite" @@ -36,6 +40,11 @@ runs: if: ${{ inputs.action == 'delete' }} shell: bash env: - GITHUB_TOKEN: ${{ github.token }} - run: - gh cache delete '${{ inputs.key }}' + GH_TOKEN: ${{ inputs.token }} + run: >- + # gh cache delete '${{ inputs.key }}' + gh api + --method DELETE + -H "Accept: application/vnd.github+json" + -H "X-GitHub-Api-Version: 2022-11-28" + "/repos/OWNER/REPO/actions/caches?key=${{ inputs.token }}" diff --git a/.github/workflows/unix.yml b/.github/workflows/unix.yml index f6cb0be526..96dbcaf6f5 100644 --- a/.github/workflows/unix.yml +++ b/.github/workflows/unix.yml @@ -15,6 +15,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + actions: write + jobs: build_shared_unix: name: Build binaries @@ -86,7 +89,8 @@ jobs: needs: ["libmamba_tests_unix"] runs-on: ubuntu-latest if: always() - permissions: write-all + permissions: + actions: write steps: - name: Checkout mamba repository uses: actions/checkout@v3 @@ -95,6 +99,7 @@ jobs: with: action: delete path: build/ + token: ${{ secrets.GITHUB_TOKEN }} umamba_integration_tests_unix: name: Micromamba integration tests