[NEW CASE] Barefoot Coffee Roasters #30
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: Handle case files | |
on: | |
issues: | |
types: [opened, edited] | |
jobs: | |
new-case-file: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install requirements | |
run: python3 -m pip install -r automation/requirements.txt | |
- name: Run parser | |
id: run_parser | |
run: | | |
python3 automation/issue.py 2>&1 | tee parser.log | |
result_code=${PIPESTATUS[0]} | |
echo "parser-output=$(cat parser.log)" >> $GITHUB_OUTPUT | |
exit $result_code | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.PR_TOKEN }} | |
title: "New coffee case #${{ github.event.issue.number }}" | |
branch: new-case-${{ github.event.issue.number }} | |
delete-branch: true | |
body: | | |
Author: @${{ github.event.issue.user.login }} | |
Closes #${{ github.event.issue.number }} | |
${{join(steps.run_parser.outputs.*, '\n')}} | |
``` | |
${{ github.event.issue.body }} | |
``` |