Add commit message input #12
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
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
who: | |
description: 'Test Workflow' | |
required: true | |
type: string | |
message: | |
description: 'Commit Message' | |
required: true | |
type: string | |
jobs: | |
hello_world_job: | |
runs-on: ubuntu-latest | |
name: A job to say hello | |
steps: | |
- uses: actions/checkout@v4 | |
- id: foo | |
uses: MohammedSentry/hello-world-composite-action@v2 | |
with: | |
who-to-greet: ${{ inputs.who || 'Mona the Octocat'}} | |
- name: Configure Git | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
- name: Commit changes | |
run: | | |
git add . | |
git commit -m "${{ github.event.inputs.message }}" | |
git push | |
- name: Output random number | |
run: echo random-number "$RANDOM_NUMBER" | |
shell: bash | |
env: | |
RANDOM_NUMBER: ${{ steps.foo.outputs.random-number }} |