gauntlet/.github/workflows/setup-linux.yaml
2024-06-16 14:24:13 +02:00

38 lines
926 B
YAML

name: setup linux
on:
workflow_call:
inputs:
command:
required: true
type: string
github-release-id:
type: string
jobs:
run-on-linux:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update
- run: sudo apt-get install -y protobuf-compiler
- uses: actions/checkout@v4
- run: git pull
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
scope: '@project-gauntlet'
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: npm ci
- run: ${{ inputs.command }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
GITHUB_RELEASE_ID: ${{ inputs.github-release-id }}