diff --git a/.github/workflows/validate-actions-workflows.yml b/.github/workflows/validate-actions-workflows.yml new file mode 100644 index 0000000..c72b858 --- /dev/null +++ b/.github/workflows/validate-actions-workflows.yml @@ -0,0 +1,26 @@ +name: Validate GitHub Actions workflows +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + +jobs: + validate-workflows: + name: Validate GitHub Actions workflows + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install action-validator with NPM + run: | + npm install -g @action-validator/core @action-validator/cli --save-dev + action-validator --help + - name: Validate workflows + run: | + # Loop over all the workflows in the .github/workflows directory. + for file in .github/workflows/*.yml; do + action-validator $file + done + diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index 9a7b1d9..0bc5a53 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -6,7 +6,7 @@ on: jobs: release: # Do not run this job for prerelease versions. - if: ! github.event.release.prerelease + if: ${{ ! github.event.release.prerelease }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2