Add Reusable Workflows

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-01-19 14:17:56 -05:00
parent 79e890f757
commit fc4cbb0814
2 changed files with 24 additions and 6 deletions
+1 -6
View File
@@ -8,15 +8,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v4 - uses: ./.github/workflows/treesitter.yaml
- uses: tree-sitter/setup-action@v2
with:
install-cli: true
# Because our tree-sitter code is in a subdirectory, # Because our tree-sitter code is in a subdirectory,
# and working-directory does not apply to uses, we # and working-directory does not apply to uses, we
# are forced to specify calls to the CI ourselves. # are forced to specify calls to the CI ourselves.
# See https://github.com/orgs/community/discussions/25742 # See https://github.com/orgs/community/discussions/25742
- run: tree-sitter generate
working-directory: ./tree-sitter-p4
- run: tree-sitter test - run: tree-sitter test
working-directory: ./tree-sitter-p4 working-directory: ./tree-sitter-p4
+23
View File
@@ -0,0 +1,23 @@
on: [workflow_call]
name: Install Treesitter
jobs:
install-treesitter:
name: Install Treesitter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
- uses: tree-sitter/setup-action@v2
with:
install-cli: true
generate-treesitter:
name: Generate Grammar
needs: install-treesitter
# Because our tree-sitter code is in a subdirectory,
# and working-directory does not apply to uses, we
# are forced to specify calls to the CI ourselves.
# See https://github.com/orgs/community/discussions/25742
- run: tree-sitter generate
working-directory: ./tree-sitter-p4