diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f52439cd69..cadf84c35c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml new file mode 100644 index 00000000000..c17568d821c --- /dev/null +++ b/.github/workflows/shellcheck.yaml @@ -0,0 +1,31 @@ +name: ShellCheck + +on: + 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 }}