Skip to content

Create action

Create action #5

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Test Action

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 47, Col: 15): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.git_hash.outputs.git_hash
- 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