mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 09:22:55 +00:00
## Problem We use ubuntu-latest as a default OS for running jobs. It can cause problems due to instability, so we should use the LTS version of Ubuntu. ## Summary of changes The image ubuntu-latest was changed with ubuntu-22.04 in workflows. ## Checklist before requesting a review - [x] I have performed a self-review of my code. - [ ] If it is a core feature, I have added thorough tests. - [ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard? - [ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section. ## Checklist before merging - [ ] Do not forget to reformat commit message to not include the above checklist
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Lint GitHub Workflows
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- release
|
|
paths:
|
|
- '.github/workflows/*.ya?ml'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/*.ya?ml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
check-permissions:
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'run-no-ci') }}
|
|
uses: ./.github/workflows/check-permissions.yml
|
|
with:
|
|
github-event-name: ${{ github.event_name}}
|
|
|
|
actionlint:
|
|
needs: [ check-permissions ]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: reviewdog/action-actionlint@v1
|
|
env:
|
|
# SC2046 - Quote this to prevent word splitting. - https://www.shellcheck.net/wiki/SC2046
|
|
# SC2086 - Double quote to prevent globbing and word splitting. - https://www.shellcheck.net/wiki/SC2086
|
|
SHELLCHECK_OPTS: --exclude=SC2046,SC2086
|
|
with:
|
|
fail_on_error: true
|
|
filter_mode: nofilter
|
|
level: error
|
|
- run: |
|
|
PAT='^\s*runs-on:.*-latest'
|
|
if grep -ERq $PAT .github/workflows
|
|
then
|
|
grep -ERl $PAT .github/workflows |\
|
|
while read -r f
|
|
do
|
|
l=$(grep -nE $PAT .github/workflows/release.yml | awk -F: '{print $1}' | head -1)
|
|
echo "::error file=$f,line=$l::Please, do not use ubuntu-latest images to run on, use LTS instead."
|
|
done
|
|
exit 1
|
|
fi
|