create-post #579
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-post | |
on: | |
workflow_dispatch: | |
inputs: | |
path: | |
description: 'File path' | |
required: true | |
content: | |
description: 'File content' | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
create-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create Post | |
run: | | |
cat << 'EOF' > ./content/post/${{ github.event.inputs.path }} | |
${{ github.event.inputs.content }} | |
EOF | |
- name: Commit and push changes | |
run: | | |
.github/workflows/script/git-push.sh ${{ github.event.inputs.path }} |