diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 0000000000..a99709f717 --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "code": 5, + "column": 3, + "file": 1, + "line": 2, + "message": 4, + "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)* \\[(.+?)\\]$" + } + ] + } + ] +} diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000000..9bb0d9c9cd --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,19 @@ +name: Lint GitHub Actions workflows + +on: + pull_request: + push: + branches: + - main + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check workflow files + run: | + echo "::add-matcher::.github/actionlint-matcher.json" + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.15/scripts/download-actionlint.bash) + ./actionlint -color + shell: bash diff --git a/.github/workflows/pr_ping.yml b/.github/workflows/pr_ping.yml index 500dfecd32..41c8f1adfc 100644 --- a/.github/workflows/pr_ping.yml +++ b/.github/workflows/pr_ping.yml @@ -29,7 +29,7 @@ jobs: pr_icon: ${{ github.event.pull_request.draft && ':pr-draft:' || ':pull-request:' }} run: | curl \ - $slack_url \ + "$slack_url" \ -X POST \ -H 'Content-Type: application/json' \ -d '{"text":"New'"$pr_status"'PR opened by '"$pr_author"' in '"$pr_repo"': #'"$pr_number"' - '"$pr_title"'","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"'"$pr_icon"' New'"$pr_status"'PR opened by *'"$pr_author"'* in `'"$pr_repo"'`:\n<'"$pr_url"'|#'"$pr_number"' - '"$pr_title"'>"}}]}' @@ -38,7 +38,7 @@ jobs: if: github.event.action == 'ready_for_review' run: | curl \ - $slack_url \ + "$slack_url" \ -X POST \ -H 'Content-Type: application/json' \ -d '{"text":"PR by '"$pr_author"' in '"$pr_repo"' marked ready for review: #'"$pr_number"' - '"$pr_title"'","blocks":[{"type":"section","text":{"type":"mrkdwn","text":":pull-request: PR by *'"$pr_author"'* in `'"$pr_repo"'` marked ready for review:\n<'"$pr_url"'|#'"$pr_number"' - '"$pr_title"'>"}}]}'