Skip to content

[auto 2.5.1] Fix automation - mercury v0.3 response decoding #15691

[auto 2.5.1] Fix automation - mercury v0.3 response decoding

[auto 2.5.1] Fix automation - mercury v0.3 response decoding #15691

name: Bash CICD Scripts
on:
pull_request:
jobs:
changes:
name: detect changes
runs-on: ubuntu-latest
outputs:
bash-cicd-scripts-src: ${{ steps.bash-cicd-scripts.outputs.src }}
steps:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: bash-cicd-scripts
with:
filters: |
src:
- '.github/scripts/bash/**'
- '.github/workflows/bash-cicd-scripts.yml'
shellcheck:
name: ShellCheck Lint
runs-on: ubuntu-latest
needs: [changes]
steps:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Run ShellCheck
if: needs.changes.outputs.bash-cicd-scripts-src == 'true'
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
with:
scandir: './.github/scripts/bash'
shellspec:
name: ShellSpec Tests
runs-on: ubuntu-latest
needs: [changes]
defaults:
run:
shell: bash
steps:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install shellspec
if: needs.changes.outputs.bash-cicd-scripts-src == 'true'
env:
VERSION: 0.28.1
VERSION_SHA256SUM: 350d3de04ba61505c54eda31a3c2ee912700f1758b1a80a284bc08fd8b6c5992
GZ_TAR_FILE: shellspec-dist.tar.gz
run: |
curl -sSfL "https://github.com/shellspec/shellspec/releases/download/${VERSION}/shellspec-dist.tar.gz" \
--output "${GZ_TAR_FILE}"
echo "Checking sha256sum of ShellSpec released archive."
echo "${VERSION_SHA256SUM} ${GZ_TAR_FILE}" | sha256sum --check
tar -xzf "${GZ_TAR_FILE}" -C "${HOME}/.local"
ln -s "${HOME}/.local/shellspec/shellspec" /usr/local/bin/shellspec
shellspec --version
- name: Run shellspec tests
if: needs.changes.outputs.bash-cicd-scripts-src == 'true'
working-directory: ./.github/scripts/bash
run: shellspec