Skip to content

create-post

create-post #579

Workflow file for this run

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