Skip to content

Commit

Permalink
fix(ci): Move differential shellcheck to its own workflow
Browse files Browse the repository at this point in the history
It is not supported in scheduled runs, and fails.

Use unique key for shellcheck group

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Feb 29, 2024
1 parent b27ecda commit 130d7b9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,6 @@ concurrency: # On new push, cancel old workflows from the same PR, branch or ta
cancel-in-progress: true

jobs:
# https://www.shellcheck.net/wiki/GitHub-Actions
# https://github.com/redhat-plumbers-in-action/differential-shellcheck?tab=readme-ov-file#usage
shell-test:
name: Differential ShellCheck
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# If needed severity levels can be controlled here
# severity: warning
- name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}

python-test:
name: Python tests
runs-on: ubuntu-22.04
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/shellcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ShellCheck

on:
push:
pull_request:

concurrency: # On new push, cancel old workflows from the same PR, branch or tag:
group: sc-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# https://www.shellcheck.net/wiki/GitHub-Actions
# https://github.com/redhat-plumbers-in-action/differential-shellcheck?tab=readme-ov-file#usage
shell-test:
name: Differential ShellCheck
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# If needed severity levels can be controlled here
# severity: warning
- name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 130d7b9

Please sign in to comment.