Create PR from Pad Entry #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 PR from Pad Entry | |
on: | |
workflow_dispatch: # This event triggers the workflow manually | |
jobs: | |
parse_pad_and_create_pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Set up Go | |
uses: actions/setup-go@main | |
with: | |
go-version: '1.21' | |
- name: Parse Pad Entry and append to content.yaml | |
id: go-run | |
working-directory: ./pad2gh | |
run: go run main.go -c ../comments.md -o ../content.yaml >> $GITHUB_OUTPUT # only prints the entry date and collects it in the output | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: 'Add episode ${{ steps.go-run.outputs.entrydate }} from Pad' | |
title: 'Add episode ${{ steps.go-run.outputs.entrydate }} from Pad' | |
body-path: comments.md | |
add-paths: content.yaml | |
branch: "content-${{ steps.go-run.outputs.entrydate }} " | |
base: main |