Skip to content

Commit

Permalink
Merge pull request #15 from carslen/chore/step_summary
Browse files Browse the repository at this point in the history
chore: add gh_step_summary test wf
  • Loading branch information
carslen authored Oct 23, 2024
2 parents 91cc378 + 1ed1413 commit a9b166f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/summary.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions scripts/failure.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions scripts/sucess.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit a9b166f

Please sign in to comment.