Create message #1
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: Create message | |
on: | |
workflow_call: | |
inputs: | |
message: | |
type: string | |
required: true | |
secrets: | |
MICROBLOG_DEPLOY_KEY: | |
required: true | |
workflow_dispatch: | |
inputs: | |
message: | |
description: 'Message to announce' | |
type: string | |
required: true | |
jobs: | |
create-message: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Hard-code the repository. This is needed when this workflow is | |
# triggered using workflow_call from other repositories. | |
repository: farmOS/farmOS-microblog | |
ssh-key: ${{ secrets.MICROBLOG_DEPLOY_KEY }} | |
- name: Configure Git. | |
run: | | |
git config --global user.name 'farmOS' | |
git config --global user.email '[email protected]' | |
- name: Commit/push to farmOS-microblog. | |
run: | | |
git commit --allow-empty --cleanup=whitespace -F- << MESSAGE | |
${{ inputs.message }} | |
MESSAGE | |
git push origin main |