Skip to content

Commit

Permalink
rename input for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Nov 27, 2024
1 parent 0510384 commit b0e4314
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compare-layouts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
# Any `pinning` of the version should be done here and forge-ci.yml.
foundry-version: nightly
# Skip the setup job if the parent job failed.
do: ${{ github.event.workflow_run.conclusion == 'success' }}
skip-install: ${{ github.event.workflow_run.conclusion != 'success' }}

# The actual job to compare the storage layouts.
compare-storage-layouts:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/reusable-foundry-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
inputs:
foundry-version:
required: true
description: "The version of Foundry to install"
type: string
do:
skip-install:
required: false
description: "Skip the installation but set the cache key. Useful to avoid installation and the extremely time consuming caching but still run this job to avoid notifications."
type: boolean
default: true
default: false
outputs:
installation-dir:
description: "The installation directory of Foundry toolchain"
Expand All @@ -30,10 +32,10 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: ${{ inputs.foundry-version }}
if: ${{ inputs.do }}
if: ${{ inputs.skip-install == false }}
- name: Print forge version
run: forge --version
if: ${{ inputs.do }}
if: ${{ inputs.skip-install == false }}
# Unfortunately, the `foundry-toolchain` action installs it in a
# randomly generated location, so we must determine it ourselves
- name: Determine Foundry installation path
Expand All @@ -42,13 +44,13 @@ jobs:
installation_path=$(which forge)
installation_dir=$(dirname $installation_path)
echo "installation-dir=$installation_dir" >> "$GITHUB_OUTPUT"
if: ${{ inputs.do }}
if: ${{ inputs.skip-install == false }}
- name: Cache the Foundry toolchain
uses: actions/cache/save@v3
with:
path: ${{ steps.find-path.outputs.installation-dir }}
key: foundry-${{ inputs.foundry-version }}
if: ${{ inputs.do }}
if: ${{ inputs.skip-install == false }}
# No if in the below step to avoid the notification that goes
# out when the action is skipped
- name: Set cache key
Expand Down

0 comments on commit b0e4314

Please sign in to comment.