Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/scripts-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Differential ShellCheck

on:
push:
paths:
- '**.sh'
branches: [ main ]
pull_request:
paths:
- '**.sh'
branches: [ 'main' ]

permissions:
contents: read

jobs:
shellcheck-lint:
runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Repository checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# Differential ShellCheck requires full git history
fetch-depth: 0

- id: ShellCheck
name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@5fa026e4797665181a0f7c6fa4a73c09348ae78c # v5
with:
token: ${{ secrets.GITHUB_TOKEN }}

- if: always()
name: Upload artifact with ShellCheck defects in SARIF format
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: Differential ShellCheck SARIF
path: ${{ steps.ShellCheck.outputs.sarif }}
2 changes: 1 addition & 1 deletion .rhdh/scripts/prepare-restricted-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function merge_registry_auth() {
if [[ -n "${TO_REGISTRY}" ]]; then
images+=("$(buildRegistryUrl)")
fi
registries=()
registries=("registry.redhat.io" "quay.io")
for img in "${images[@]}"; do
reg=$(echo "$img" | cut -d'/' -f1)
[[ " ${registries[*]} " =~ " $reg " ]] || registries+=("$reg")
Expand Down