Skip to content

ci: split workflow

ci: split workflow #9

Workflow file for this run

name: test
on: pull_request
jobs:
path-filter:
# Get changed files to filter jobs
outputs:
update-aqua-checksums: ${{steps.changes.outputs.update-aqua-checksums}}
renovate-config-validator: ${{steps.changes.outputs.renovate-config-validator}}
ghalint: ${{steps.changes.outputs.ghalint}}
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
with:
filters: |
update-aqua-checksums:
- aqua/aqua.yaml
- aqua/*.yaml
- aqua/aqua-checksums.json
- .github/workflows/test.yaml
renovate-config-validator:
- renovate.json5
- .github/workflows/test.yaml
- .github/workflows/wc-renovate-config-validator.yaml
ghalint:
- .github/workflows/*.yaml
- aqua/ghalint.yaml
build-schema:
- .github/workflows/test.yaml
- .github/workflows/wc-deploy-schema.yaml
- schema/**
enable-automerge:
needs:
- status-check
if: |
! failure() && ! cancelled() && github.event.pull_request.user.login == 'renovate[bot]' && contains(github.event.pull_request.body, ' **Automerge**: Enabled.')
# Enable automerge to merge pull requests from Renovate automatically.
runs-on: ubuntu-latest
# "! failure() && ! cancelled()" is required. success() returns false if dependent jobs are skipped. https://github.com/community/community/discussions/45058
# By default success() is used so we have to override success() by "! failure() && ! cancelled()"
permissions: {}
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c # v1
with:
app_id: ${{secrets.APP_ID}}
private_key: ${{secrets.APP_PRIVATE_KEY}}
- run: gh -R "$GITHUB_REPOSITORY" pr merge --merge --auto --delete-branch "$PR_NUMBER"
env:
GITHUB_TOKEN: ${{steps.generate_token.outputs.token}} # Use GitHub App to trigger GitHub Actions Workflow by merge commit.
PR_NUMBER: ${{github.event.pull_request.number}}
status-check:
# This job is used for main branch's branch protection rule's status check.
# If all dependent jobs succeed or are skipped this job succeeds.
runs-on: ubuntu-latest
needs:
- update-aqua-checksums
- test-get-target-config
- test-list-working-dirs
- renovate-config-validator
- ghalint
- build-schema
- create-pr-branch
permissions: {}
if: failure()
steps:
- run: exit 1
update-aqua-checksums:
needs: path-filter
if: needs.path-filter.outputs.update-aqua-checksums == 'true'
uses: ./.github/workflows/wc-update-aqua-checksums.yaml
permissions:
contents: read
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
renovate-config-validator:
uses: ./.github/workflows/wc-renovate-config-validator.yaml
needs: path-filter
if: needs.path-filter.outputs.renovate-config-validator == 'true'
permissions:
contents: read
ghalint:
needs: path-filter
if: needs.path-filter.outputs.ghalint == 'true'
uses: ./.github/workflows/wc-ghalint.yaml
permissions: {}
test-get-target-config:
uses: ./.github/workflows/wc-test-get-target-config.yaml
permissions: {}
test-list-working-dirs:
uses: ./.github/workflows/wc-test-list-working-dirs.yaml
permissions: {}
build-schema:
uses: ./.github/workflows/wc-deploy-schema.yaml
permissions:
contents: write
create-pr-branch:
uses: .github/workflows/wc-create-pr-branch.yaml

Check failure on line 112 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

invalid value workflow reference: no version specified
if: github.event.pull_request.user.login == 'suzuki-shunsuke'
permissions:
contents: write
pull-requests: write
with:
pr: ${{github.event.pull_request.number}}
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}