From 64f24deb51f216a8115744acd36b8851a75e0ce4 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 9 Oct 2024 10:34:10 -0400 Subject: [PATCH 1/5] github: drop commits job, we only have a `main` branch Signed-off-by: Simon Deziel --- .github/workflows/commits.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/commits.yml 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 From 0be6a2377edd85c7745e6755c6345b061d23ce09 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 8 Oct 2024 18:53:32 -0400 Subject: [PATCH 2/5] github: fix yaml comment indent Signed-off-by: Simon Deziel --- .github/workflows/image-amazonlinux.yml | 2 +- .github/workflows/image-oracle.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: From 97cc8dcc1d6c859ee89d93ecb87bdc4a347b4548 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 9 Oct 2024 10:43:33 -0400 Subject: [PATCH 3/5] github: add lint workflow Do strict yamllint checking. Signed-off-by: Simon Deziel --- .github/workflows/lint.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/lint.yml 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 From 7ecbb65dafddcf1ac0ffe59e0af8dfe4e67f70fc Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 9 Oct 2024 10:40:57 -0400 Subject: [PATCH 4/5] github: remove yamllint check from code job Signed-off-by: Simon Deziel --- .github/workflows/tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f43cb4de8..1be621197 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,11 +56,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 From d83eaa2aed82da6d2b3be95091308de39ac5bc92 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 9 Oct 2024 11:28:17 -0400 Subject: [PATCH 5/5] github: don't run Tests job upon merging into `main` Signed-off-by: Simon Deziel --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1be621197..b4580375d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,5 @@ name: Tests on: - push: pull_request: paths: - '.github/**'