Skip to content

Commit

Permalink
Try setting github token differently
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Oct 30, 2023
1 parent f6cb72b commit b9604f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .github/actions/workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }}"
7 changes: 6 additions & 1 deletion .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
actions: write

jobs:
build_shared_unix:
name: Build binaries
Expand Down Expand Up @@ -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
Expand All @@ -95,6 +99,7 @@ jobs:
with:
action: delete
path: build/
token: ${{ secrets.GITHUB_TOKEN }}

umamba_integration_tests_unix:
name: Micromamba integration tests
Expand Down

0 comments on commit b9604f5

Please sign in to comment.