Skip to content

Create action

Create action #3

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: 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