From cc7d049e66d67032f425d53f0190bcac268bc4b7 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Mon, 10 Feb 2025 13:36:44 +0100 Subject: [PATCH 1/2] Check sh scripts in CI --- .github/workflows/scripts-checks.yaml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/scripts-checks.yaml diff --git a/.github/workflows/scripts-checks.yaml b/.github/workflows/scripts-checks.yaml new file mode 100644 index 000000000..be9fb5a69 --- /dev/null +++ b/.github/workflows/scripts-checks.yaml @@ -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 }} From 39eddaa91cf06b926a2576cebbb4a9d10db089fe Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Mon, 10 Feb 2025 13:37:03 +0100 Subject: [PATCH 2/2] Include registry auth creds for know registries by default in the airgap install script --- .rhdh/scripts/prepare-restricted-environment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rhdh/scripts/prepare-restricted-environment.sh b/.rhdh/scripts/prepare-restricted-environment.sh index 37aef90eb..0fb59e54b 100755 --- a/.rhdh/scripts/prepare-restricted-environment.sh +++ b/.rhdh/scripts/prepare-restricted-environment.sh @@ -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")