fix: populate hadolint_output #211
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
paths: | |
- "**.sh" | |
- "test/**" | |
- "action.yml" | |
- ".github/workflows/test.yml" | |
jobs: | |
bash_unit: | |
name: Bash unit tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Hadolint version | |
# yq is like jq for yaml | |
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#tools | |
# shellcheck disable=SC2034 | |
run: echo version="$(yq .inputs.version.default action.yml)" >> "${GITHUB_ENV}" | |
- name: Install Hadolint | |
run: | | |
echo "::debug::Downloading Hadolint ${{ env.version }}" | |
curl -L -s -o hadolint "https://github.com/hadolint/hadolint/releases/download/v${{ env.version }}/hadolint-Linux-x86_64" | |
chmod +x hadolint | |
sudo mv hadolint /usr/local/bin/hadolint | |
- name: Install bash_unit | |
run: curl -Ls "https://github.com/pgrange/bash_unit/archive/refs/tags/v2.1.0.tar.gz" | tar -x -z --wildcards --strip-components=1 -C /usr/local/bin "*/bash_unit" | |
- name: Run suite | |
run: bash_unit test/*.sh |