feat(modules): set variable default values #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pre-commit | |
permissions: | |
contents: read | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-22.04 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache ASDF | |
uses: actions/cache@v4 | |
id: asdf-cache | |
with: | |
path: ~/.asdf/ | |
key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }} | |
restore-keys: ${{ runner.os }}-asdf- | |
- name: Setup ASDF | |
uses: asdf-vm/actions/setup@v3 | |
if: ${{ steps.asdf-cache.outputs.cache-hit == 'true' }} | |
- name: Install ASDF | |
uses: asdf-vm/actions/install@v3 | |
if: ${{ steps.asdf-cache.outputs.cache-hit != 'true' }} | |
- name: Reshim installed ASDF tools | |
shell: bash | |
run: asdf reshim | |
- name: Cache pip dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt', '.pre-commit-config.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install pip dependencies | |
run: pip install -r requirements.txt | |
- uses: pre-commit/[email protected] |