Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add actionlint (#270)
sarayourfriend8397254fe5d8
diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.jsonnew file mode 100644index 000000000..a99709f71--- /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/sync.yml b/.github/sync.ymlindex b5c4c7285..38a7854ab 100644--- a/.github/sync.yml+++ b/.github/sync.yml@@ -22,6 +22,10 @@ group:dest: .github/workflows/pr_label_check.yml- source: .github/workflows/pr_ping.ymldest: .github/workflows/pr_ping.yml+ - source: .github/workflows/actionlint.yml+ dest: .github/workflows/actionlint.yml+ - source: .github/actionlint-matcher.json+ dest: .github/actionlint-matcher.json# Downstream workflows- source: .github/workflows_downstream/draft_release.ymldest: .github/workflows/draft_release.ymldiff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.ymlnew file mode 100644index 000000000..9bb0d9c9c--- /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: bashdiff --git a/.github/workflows/discussion_ping.yml b/.github/workflows/discussion_ping.ymlindex df52c5a23..243eedec7 100644--- a/.github/workflows/discussion_ping.yml+++ b/.github/workflows/discussion_ping.yml@@ -21,7 +21,7 @@ jobs:- name: Send notification for new discussionrun: |curl \- $slack_url \+ "$slack_url" \-X POST \-H 'Content-Type: application/json' \-d '{"text":"New discussion opened by '"$discussion_author"' in '"$discussion_repo"': #'"$discussion_number"' - '"$discussion_title"'","blocks":[{"type":"section","text":{"type":"mrkdwn","text":":github: New discussion opened by *'"$discussion_author"'* in `'"$discussion_repo"'`:\n<'"$discussion_url"'|#'"$discussion_number"' - '"$discussion_title"'>"}}]}'diff --git a/.github/workflows/label_pr.yml b/.github/workflows/label_pr.ymlindex 85ad7aba2..ac08dcbb9 100644--- a/.github/workflows/label_pr.yml+++ b/.github/workflows/label_pr.yml@@ -36,4 +36,4 @@ jobs:working-directory: ./automations/pythonrun: |pipenv run python label_pr.py \- --pr-url $PR_URL+ --pr-url "$PR_URL"diff --git a/.github/workflows/pr_ping.yml b/.github/workflows/pr_ping.ymlindex 500dfecd3..41c8f1adf 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"'>"}}]}'