diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml deleted file mode 100644 index 3126e3901..000000000 --- a/.github/workflows/commits.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Commits -on: - - pull_request - -permissions: - contents: read - -jobs: - commits: - name: Branch target - runs-on: ubuntu-24.04 - steps: - - name: Check branch target - env: - TARGET: ${{ github.event.pull_request.base.ref }} - run: | - set -x - [ "${TARGET}" = "main" ] && exit 0 - - echo "Invalid branch target: ${TARGET}" - exit 1 diff --git a/.github/workflows/image-amazonlinux.yml b/.github/workflows/image-amazonlinux.yml index 446e29927..a1fe01925 100644 --- a/.github/workflows/image-amazonlinux.yml +++ b/.github/workflows/image-amazonlinux.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: release: - - 2 # Requires cgroups v1 for tests. They will pass on ubuntu-20.04 runner. + - 2 # Requires cgroups v1 for tests. They will pass on ubuntu-20.04 runner. - 2023 variant: - default diff --git a/.github/workflows/image-oracle.yml b/.github/workflows/image-oracle.yml index d809880c7..b41285803 100644 --- a/.github/workflows/image-oracle.yml +++ b/.github/workflows/image-oracle.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: release: - - 7 # Requires cgroups v1 for tests. They will pass on ubuntu-20.04 runner. + - 7 # Requires cgroups v1 for tests. They will pass on ubuntu-20.04 runner. - 8 - 9 variant: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..fe388daf2 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: Lint +on: + pull_request: + paths: + - '.github/workflows/**' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +defaults: + run: + # Make sure bash is always invoked with `-eo pipefail` + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell + shell: bash + +jobs: + lint-tests: + name: Lint + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: yamllint + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: .github/workflows/ + strict: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f43cb4de8..b4580375d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,5 @@ name: Tests on: - push: pull_request: paths: - '.github/**' @@ -56,11 +55,6 @@ jobs: # A non-shallow clone is needed for the Differential ShellCheck fetch-depth: 0 - - name: yamllint - uses: ibiqlik/action-yamllint@v3 - with: - file_or_dir: .github/workflows/ - - id: ShellCheck name: Differential ShellCheck uses: redhat-plumbers-in-action/differential-shellcheck@v5