Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add gh_step_summary test wf #15

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"