Skip to content

Commit

Permalink
added proper handling of build cache token
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Sep 17, 2024
1 parent b7108a9 commit 03df401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ jobs:
- uses: mochi-hpc/mochi-build-release-action@main
with:
package: mochi-margo
build-cache-token: ${{ secrets.GITHUB_TOKEN }}

8 changes: 2 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ inputs:
package:
description: 'Package to build'
required: true
push-to-build-cache:
description: 'Whether to push specs to build cache after a successful build'
required: false
default: 'false'
build-cache-token:
description: 'Token to use to push into the build cache'
required: false
default: '<unspecified>'
default: 'unspecified'

runs:
using: "composite"
Expand Down Expand Up @@ -50,7 +46,7 @@ runs:
spack -e "$GITHUB_ACTION_PATH" install
- name: Push packages to buildcache and update index
if: ${{ inputs.push-to-build-cache == 'true' }}
if: ${{ inputs.build-cache-token != 'unspecified' }}
shell: bash
run: |
spack -e "$GITHUB_ACTION_PATH" mirror set --push \
Expand Down

0 comments on commit 03df401

Please sign in to comment.