-
Notifications
You must be signed in to change notification settings - Fork 6
Add explicit permissions and remove decorator comments from workflows #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
swissspidy
merged 6 commits into
main
from
copilot/follow-github-actions-best-practices
Jan 20, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eea9301
Initial plan
Copilot 481e0dc
Remove separator comments and add permissions to workflows
Copilot e9794f2
Remove accidentally committed actionlint binary
Copilot 00a7869
Incorporate from #53
swissspidy 474c0fe
Pin action versions
swissspidy 27109ad
Update .github/workflows/issue-triage.yml
swissspidy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,9 @@ on: | |
| required: false | ||
| default: '' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # Cancels all previous workflow runs for the same branch that have not yet completed. | ||
| concurrency: | ||
| # The concurrency group contains the workflow name and the branch name. | ||
|
|
@@ -17,12 +20,12 @@ concurrency: | |
|
|
||
| jobs: | ||
|
|
||
| actionlint: #----------------------------------------------------------------------- | ||
swissspidy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| actionlint: | ||
| name: Lint GitHub Actions workflows | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out source code | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Add problem matcher | ||
| run: | | ||
|
|
@@ -34,22 +37,22 @@ jobs: | |
| with: | ||
| args: -color -shellcheck= | ||
|
|
||
| lint: #----------------------------------------------------------------------- | ||
| lint: | ||
| name: Lint PHP files | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out source code | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Check existence of composer.json file | ||
| id: check_composer_file | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: "composer.json" | ||
|
|
||
| - name: Set up PHP environment | ||
| if: steps.check_composer_file.outputs.files_exists == 'true' | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2 | ||
| with: | ||
| php-version: 'latest' | ||
| ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | ||
|
|
@@ -59,7 +62,7 @@ jobs: | |
|
|
||
| - name: Install Composer dependencies & cache dependencies | ||
| if: steps.check_composer_file.outputs.files_exists == 'true' | ||
| uses: "ramsey/composer-install@v3" | ||
| uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 | ||
| env: | ||
| COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} | ||
| with: | ||
|
|
@@ -68,7 +71,7 @@ jobs: | |
|
|
||
| - name: Check existence of vendor/bin/parallel-lint file | ||
| id: check_linter_file | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: "vendor/bin/parallel-lint" | ||
|
|
||
|
|
@@ -95,56 +98,56 @@ jobs: | |
| env: | ||
| ADDITIONAL_EXCLUDES: ${{ inputs.parallel-lint-excludes }} | ||
|
|
||
| lint-gherkin: #---------------------------------------------------------------- | ||
| lint-gherkin: | ||
| name: Lint Gherkin Feature files | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out source code | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v6 | ||
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | ||
|
|
||
| - name: Download lint rules | ||
| run: curl https://raw.githubusercontent.com/wp-cli/.github/refs/heads/main/.gherkin-lintrc -o $RUNNER_TEMP/.gherkin-lintrc | ||
|
|
||
| - name: Run linter | ||
| run: npx --yes gherkin-lint -c $RUNNER_TEMP/.gherkin-lintrc | ||
|
|
||
| lint-spellcheck: #---------------------------------------------------------------- | ||
| lint-spellcheck: | ||
| name: Spell check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out source code | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Check existence of config file | ||
| id: check_files | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: ".typos.toml" | ||
|
|
||
| - name: Check spelling | ||
| if: steps.check_files.outputs.files_exists == 'true' | ||
| uses: crate-ci/[email protected] | ||
| uses: crate-ci/typos@65120634e79d8374d1aa2f27e54baa0c364fff5a # v1.42.1 | ||
|
|
||
| phpcs: #---------------------------------------------------------------------- | ||
| phpcs: | ||
| name: PHPCS | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out source code | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Check existence of composer.json & phpcs.xml.dist files | ||
| id: check_files | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: "composer.json, phpcs.xml.dist" | ||
|
|
||
| - name: Set up PHP environment | ||
| if: steps.check_files.outputs.files_exists == 'true' | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2 | ||
| with: | ||
| php-version: 'latest' | ||
| tools: cs2pr | ||
|
|
@@ -153,7 +156,7 @@ jobs: | |
|
|
||
| - name: Install Composer dependencies & cache dependencies | ||
| if: steps.check_files.outputs.files_exists == 'true' | ||
| uses: "ramsey/composer-install@v3" | ||
| uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 | ||
| env: | ||
| COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} | ||
| with: | ||
|
|
@@ -162,7 +165,7 @@ jobs: | |
|
|
||
| - name: Check existence of vendor/bin/phpcs file | ||
| id: check_phpcs_binary_file | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: "vendor/bin/phpcs" | ||
|
|
||
|
|
@@ -177,23 +180,23 @@ jobs: | |
| cs2pr /tmp/phpcs-checkstyle-report.xml | ||
| fi | ||
|
|
||
| phpstan: #---------------------------------------------------------------------- | ||
| phpstan: | ||
| name: PHPStan | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out source code | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Check existence of composer.json & phpcs.xml.dist files | ||
| id: check_files | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: "composer.json" | ||
|
|
||
| - name: Set up PHP environment | ||
| if: steps.check_files.outputs.files_exists == 'true' | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2 | ||
| with: | ||
| php-version: 'latest' | ||
| tools: cs2pr | ||
|
|
@@ -202,7 +205,7 @@ jobs: | |
|
|
||
| - name: Install Composer dependencies & cache dependencies | ||
| if: steps.check_files.outputs.files_exists == 'true' | ||
| uses: "ramsey/composer-install@v3" | ||
| uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3 | ||
| env: | ||
| COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} | ||
| with: | ||
|
|
@@ -211,7 +214,7 @@ jobs: | |
|
|
||
| - name: Check existence of vendor/bin/phpstan file | ||
| id: check_phpstan_binary_file | ||
| uses: andstor/file-existence-action@v3 | ||
| uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3 | ||
| with: | ||
| files: "vendor/bin/phpstan" | ||
|
|
||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.