Skip to content

Add commit message input #12

Add commit message input

Add commit message input #12

Workflow file for this run

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