Missing poster for movie Next Goal Wins #166
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: Comment Action | |
on: | |
issue_comment: | |
jobs: | |
issue_commented: | |
name: Issue Comment | |
if: ${{ !github.event.issue.pull_request && github.event.comment.user.login == 'ImDevinC' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install yq | |
run: sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && sudo chmod a+x /usr/local/bin/yq | |
- name: Add Movie | |
run: ./add_movie.sh "${{ github.event.issue.title }}" "${{ github.event.comment.body }}" | |
- name: Create Pull Request | |
id: create_pr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
title: "[CI] Added ${{ github.event.issue.title}}" | |
commit-message: "[CI] Added ${{ github.event.issue.title}}" | |
branch: "feat-auto-${{ github.event.comment.id }}" | |
base: main | |
body: "Fixes #${{ github.event.issue.number }}" | |
token: ${{ secrets.REPO_PAT }} | |
- name: Enable Auto-merge | |
uses: peter-evans/enable-pull-request-automerge@v2 | |
with: | |
token: ${{ secrets.REPO_PAT }} | |
pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }} |