From 7ad2f0d001343806351fc2644589184c72cae61d Mon Sep 17 00:00:00 2001 From: lcxznpy <80241815+lcxznpy@users.noreply.github.com> Date: Sun, 28 Apr 2024 15:28:01 +0800 Subject: [PATCH] Create check-action-file.yaml (#31) * Create check-action-file.yaml * update trigger condition --- .github/workflows/check-action-file.yaml | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/check-action-file.yaml diff --git a/.github/workflows/check-action-file.yaml b/.github/workflows/check-action-file.yaml new file mode 100644 index 0000000..a826d29 --- /dev/null +++ b/.github/workflows/check-action-file.yaml @@ -0,0 +1,31 @@ +name: Check Yaml + +on: + pull_request: + branches: + - main + - 'release/*' + +permissions: + contents: read + +jobs: + validate-github-actions-workflows: + name: Validate GitHub Actions workflows + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check for any changed workflows + id: check-for-changed-workflows + uses: tj-actions/changed-files@v41 + with: + files: | + .github/workflows/**.yaml + - name: Validate workflows + if: steps.check-for-changed-workflows.outputs.any_changed == 'true' + uses: dsanders11/json-schema-validate-action@v1.1.2 + with: + schema: https://json.schemastore.org/github-workflow.json + files: .github/workflows/**.yaml