-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Test Action | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to deploy to' | ||
required: true | ||
default: 'staging' | ||
type: choice | ||
options: | ||
- staging | ||
- production | ||
debug_mode: | ||
description: 'Enable debug mode' | ||
required: false | ||
type: boolean | ||
default: false | ||
version: | ||
description: 'Version to deploy' | ||
required: true | ||
type: string | ||
default: '1.0.0' | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
name: Test Update Input Params Action | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- 'ubuntu-latest' | ||
- 'macos-latest' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set git latest commit hash of this branch | ||
id: git_hash | ||
run: | | ||
git_hash=$(git rev-parse --short HEAD) | ||
echo "git_hash=$git_hash" | ||
echo "git_hash=$git_hash" >> $GITHUB_OUTPUT | ||
- name: Run Update Input Params Action | ||
uses: m-s-abeer/update-gha-summary-with-workflow-inputs@$GITHUB_SHA | ||
- name: Verify Summary Content | ||
run: | | ||
if [ ! -f "$GITHUB_STEP_SUMMARY" ]; then | ||
echo "Summary file was not created!" | ||
exit 1 | ||
fi | ||
if ! grep -q "Workflow Input Parameters" "$GITHUB_STEP_SUMMARY"; then | ||
echo "Summary table header not found!" | ||
exit 1 | ||
fi | ||
if ! grep -q "environment" "$GITHUB_STEP_SUMMARY"; then | ||
echo "Expected input parameter 'environment' not found in summary!" | ||
exit 1 | ||
fi |