diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 000000000..68878335f --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 000000000..d5d639a6a --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,14 @@ +name: Lint GitHub Actions workflows +on: [push, pull_request] + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check workflow files + run: | + echo "::add-matcher::.github/actionlint-matcher.json" + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.7.4/scripts/download-actionlint.bash) + ./actionlint -color + shell: bash diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index d86ead898..be48f9720 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -9,9 +9,9 @@ jobs: shell: bash env: PR_NUM: ${{ github.event.number }} - run: echo $PR_NUM > pr_num.txt + run: echo "$PR_NUM" > pr_num.txt - name: Upload the PR number uses: actions/upload-artifact@v4 with: name: pr_num - path: ./pr_num.txt \ No newline at end of file + path: ./pr_num.txt diff --git a/.github/workflows/create-prerelease-on-tag.yml b/.github/workflows/create-prerelease-on-tag.yml index 0545f1806..19be4e718 100644 --- a/.github/workflows/create-prerelease-on-tag.yml +++ b/.github/workflows/create-prerelease-on-tag.yml @@ -36,7 +36,7 @@ jobs: id: hash run: | cd builds - echo "hashes=$(sha256sum * | base64 -w0)" >> "$GITHUB_OUTPUT" + echo "hashes=$(sha256sum -- * | base64 -w0)" >> "$GITHUB_OUTPUT" - name: Release id: release diff --git a/.github/workflows/delay.yml b/.github/workflows/delay.yml index e3859f262..e77da22ca 100644 --- a/.github/workflows/delay.yml +++ b/.github/workflows/delay.yml @@ -39,6 +39,5 @@ jobs: inputs: | { "attemptNumber": "${{ github.event.inputs.attemptNumber }}", - "maxAttempts": "${{ github.event.inputs.maxAttempts }}", - "environment": "${{ github.event.inputs.environment }}" + "maxAttempts": "${{ github.event.inputs.maxAttempts }}" } diff --git a/.github/workflows/playwright_comment.yml b/.github/workflows/playwright_comment.yml index 61d90d57f..013eb2517 100644 --- a/.github/workflows/playwright_comment.yml +++ b/.github/workflows/playwright_comment.yml @@ -53,14 +53,16 @@ jobs: id: playwright run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - echo "PLAYWRIGHT_OUTPUT<<$EOF" >> $GITHUB_OUTPUT - cat ./playwright-output >> $GITHUB_OUTPUT - echo "$EOF" >> $GITHUB_OUTPUT - echo "MASTER_SCREENSHOTS_OUTCOME<<$EOF" >> $GITHUB_OUTPUT - cat ./master-screenshots-outcome >> $GITHUB_OUTPUT - echo "$EOF" >> $GITHUB_OUTPUT - echo "FAILED=$(grep -c '^ *[0-9] failed$' $GITHUB_OUTPUT)" >> $GITHUB_OUTPUT - echo "FLAKY=$(grep -c '^ *[0-9] flaky$' $GITHUB_OUTPUT)" >> $GITHUB_OUTPUT + { + echo "PLAYWRIGHT_OUTPUT<<$EOF"; + cat ./playwright-output; + echo "$EOF"; + echo "MASTER_SCREENSHOTS_OUTCOME<<$EOF"; + cat ./master-screenshots-outcome; + echo "$EOF"; + echo "FAILED=$(grep -c '^ *[0-9] failed$' ./playwright-output)"; + echo "FLAKY=$(grep -c '^ *[0-9] flaky$' ./playwright-output)" + } >> "$GITHUB_OUTPUT" # this is required because github.event.workflow_run.pull_requests is not available for PRs from forks - name: "Get PR information" @@ -91,4 +93,4 @@ jobs: with: issue: ${{ steps.source-run-info.outputs.pullRequestNumber }} message: ${{ steps.playwright-summary.outputs.summary }} - update-only: true \ No newline at end of file + update-only: true diff --git a/.github/workflows/publish-chrome-development.yml b/.github/workflows/publish-chrome-development.yml index a3578ec07..22ec2038c 100644 --- a/.github/workflows/publish-chrome-development.yml +++ b/.github/workflows/publish-chrome-development.yml @@ -21,7 +21,6 @@ jobs: environment: cd outputs: result: ${{ steps.webStorePublish.outcome }} - releaseUploadUrl: ${{ steps.getZipAsset.outputs.releaseUploadUrl }} permissions: actions: write contents: write diff --git a/.github/workflows/publish-chrome.yml b/.github/workflows/publish-chrome.yml index f84646b7d..d88b61c04 100644 --- a/.github/workflows/publish-chrome.yml +++ b/.github/workflows/publish-chrome.yml @@ -18,7 +18,6 @@ jobs: environment: cd outputs: result: ${{ steps.webStorePublish.outcome }} - releaseUploadUrl: ${{ steps.getZipAsset.outputs.releaseUploadUrl }} permissions: actions: write steps: diff --git a/test/data/json.json b/test/data/json.json index 321bff648..b5d102b42 100644 --- a/test/data/json.json +++ b/test/data/json.json @@ -9,6 +9,7 @@ {"path": ".vscode/settings.json", "ignore": true}, {"path": ".vscode/extensions.json", "ignore": true}, {"path": ".vscode/launch.json", "ignore": true}, + {"path": ".github/actionlint-matcher.json", "ignore": true}, {"path": "dev/jsconfig.json", "ignore": true}, {"path": "ext/manifest.json", "ignore": true}, {"path": "test/data/dictionaries/invalid-dictionary1/index.json", "ignore": true},