Create action #5
Workflow file for this run
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
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: ./.github/workflows/update-gha-summary-with-workflow-inputs@${{ steps.git_hash.outputs.git_hash }} | ||
Check failure on line 47 in .github/workflows/test.yml
|
||
- 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 |