Merge pull request #15 from ok-nick/home-and-no-cache-default

Disable cache by default & use `$HOME` for env vars
This commit is contained in:
nick 2023-09-20 13:22:12 -04:00 committed by GitHub
commit 047c37f2ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -15,6 +15,8 @@ defaults:
jobs: jobs:
test-cache: test-cache:
uses: ./.github/workflows/env.yml uses: ./.github/workflows/env.yml
with:
cache: "true"
test-no-cache: test-no-cache:
uses: ./.github/workflows/env.yml uses: ./.github/workflows/env.yml
with: with:

View file

@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
## Changed
- Disable caching by default #15
## Fixed
- Issue causing executables to not be found #14
## [0.4.1] - 2023-09-18 ## [0.4.1] - 2023-09-18
## Fixed ## Fixed

View file

@ -12,7 +12,7 @@ inputs:
required: false required: false
cache: cache:
description: "Whether to enable caching" description: "Whether to enable caching"
default: "true" default: "false"
required: false required: false
token: token:
description: "GitHub token via `github.token`" description: "GitHub token via `github.token`"
@ -58,12 +58,12 @@ runs:
- name: Set environment variable - name: Set environment variable
if: runner.os != 'Windows' if: runner.os != 'Windows'
run: echo "~/.aftman/bin" >> $GITHUB_PATH run: echo "$HOME/.aftman/bin" >> $GITHUB_PATH
shell: bash shell: bash
- name: Create auth file - name: Create auth file
run: | run: |
cat > ~/.aftman/auth.toml << EOF cat > $HOME/.aftman/auth.toml << EOF
github = "${{ inputs.token }}" github = "${{ inputs.token }}"
EOF EOF
shell: bash shell: bash
@ -75,7 +75,6 @@ runs:
path: | path: |
~/.aftman/bin ~/.aftman/bin
~/.aftman/tool-storage ~/.aftman/tool-storage
# TODO: also hash ~/.aftman/aftman.toml
key: ${{ runner.os }}-aftman-${{hashFiles(format('{0}/{1}', inputs.path, 'aftman.toml'))}} key: ${{ runner.os }}-aftman-${{hashFiles(format('{0}/{1}', inputs.path, 'aftman.toml'))}}
- name: Install tools - name: Install tools