Set up github workflows #2
Workflow file for this run
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: validate | |
concurrency: | |
group: validate | |
cancel-in-progress: true | |
# | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
# Main filter detecting where in the repo changes have been made, allowing us to be smart about how we respond | |
detect-changes: | |
runs-on: ubuntu-latest | |
environment: staging | |
outputs: | |
lint: ${{ steps.check.outputs.lint }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: check | |
with: | |
filters: | | |
lint: | |
- 'tb_pulumi/**' | |
- '.github/workflows/validate.yml' | |
# Run Ruff against tb_pulumi | |
lint: | |
needs: detect-changes | |
runs-on: ubuntu-latest | |
environment: staging | |
if: needs.detect-changes.outputs.lint == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Quick lint with Ruff | |
uses: chartboost/ruff-action@v1 | |
with: | |
src: './tb_pulumi' | |
args: 'format --check' |