Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use reusable workflow #14

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,19 @@ jobs:
- name: Check formatting
run: npm run fmt:check

get-scarb-version:
uses: foundry-rs/starknet-foundry/.github/workflows/scarb_version.yml@reusable-get-supported-scarb-version-workflow

test-action:
runs-on: ubuntu-latest
needs: get-scarb-version
steps:
- uses: actions/checkout@v3

- name: Get scarb version
id: extractScarbVersion
run: |
snfoundry_version=$(curl -s https://api.github.com/repos/foundry-rs/starknet-foundry/releases/latest | grep tarball_url | awk -F '/' '{print $8}' | tr -d '",')
version=$(curl -s https://raw.githubusercontent.com/foundry-rs/starknet-foundry/$snfoundry_version/.tool-versions | awk '{print $2}')

echo "scarbVersion=$version" >> "$GITHUB_OUTPUT"
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ steps.extractScarbVersion.outputs.scarbVersion }}
scarb-version: ${{ needs.get-scarb-version.outputs.version }}

- name: Test local action
uses: ./
Expand Down
Loading