Skip to content

Bump rubocop-govuk from 5.1.2 to 5.1.4 in /infra #75

Bump rubocop-govuk from 5.1.2 to 5.1.4 in /infra

Bump rubocop-govuk from 5.1.2 to 5.1.4 in /infra #75

Workflow file for this run

name: "Shell script CI"
on:
pull_request:
branches: [main]
merge_group:
types: [checks_requested]
jobs:
shell-ci:
runs-on: ubuntu-latest
name: Shell
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint shell scripts
run: |
# we don't have non-alpha-numeric file names
# shellcheck disable=SC2038
find . -type f \
-name "*.sh" \
-not \
-path "*/.terraform/*" \
| xargs -L1 shellcheck
- name: Lint shell scripts in GitHub actions
run: |
# This is not the usual/best way to get the script directory.
# We need to do this here because GitHub Actions writes the
# content of script blocks like these to a temp directory,
# which means the source code directory and the directory
# in which the script reside are different
script_dir="$(readlink -f "$(dirname .github)")"
while IFS= read -r -d '' workflow
do
for path in $(yq '.jobs[] | .steps[] | select(.|has("run")) | .run | "."+(path | join("."))' "${script_dir}/${workflow}");
do
pushd "$(mktemp -d)" >/dev/null || exit
workflow_name="$(basename "${script_dir}/${workflow}")"
file="${workflow_name}__${path}"
touch "${file}"
yq "${path}" "${script_dir}/${workflow}" > "${file}"
shellcheck -s bash "${file}"
popd >/dev/null || exit
done
done < <(find ".github/workflows" -type f \( -name "*.yml" -or -name "*.yaml" \) -print0)
- name: Lint shell scripts in CodeBuild build specs
run: |
./support/shellcheck_codebuild.sh