diff --git a/.github/workflows/summary.yaml b/.github/workflows/summary.yaml new file mode 100644 index 0000000..552c128 --- /dev/null +++ b/.github/workflows/summary.yaml @@ -0,0 +1,16 @@ +name: test wf summary + +on: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Run fail script + id: fail + run: ./scripts/failure.sh + + - name: Run pass script + id: pass + run: ./scripts/sucess.sh diff --git a/scripts/failure.sh b/scripts/failure.sh new file mode 100644 index 0000000..0a3fa5d --- /dev/null +++ b/scripts/failure.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo "This script will fail" + +images=("alpine" "gibtsnicht:1.23.34") + +for image in "${images[@]}"; do + error=$(docker pull "$image" 2>&1) || echo "$error" >> "$GITHUB_STEP_SUMMARY" +done diff --git a/scripts/sucess.sh b/scripts/sucess.sh new file mode 100644 index 0000000..170250a --- /dev/null +++ b/scripts/sucess.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +echo -e "This is a successful script execution" +echo -e "This is a successful script execution" +echo -e "This is a successful script execution" + +ls "$github_workspace"