Resources: New templates of Taiyuan Metro #393
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: Issue bot | |
on: | |
issues: | |
types: [opened, edited] | |
jobs: | |
updateTemplates: | |
runs-on: ubuntu-latest | |
if: contains(github.event.issue.body, 'Do not edit lines below, they are meant for bots only!!!') && !contains(github.event.issue.body, 'REPLACE ME') | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.RMG_BUILD_AND_RELEASE }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- run: npm ci | |
working-directory: ./package | |
- name: Update and push | |
run: ./scripts/issuebot.sh | |
shell: bash | |
env: | |
ISSUE_BODY: ${{ github.event.issue.body }} | |
ISSUE_NUMBER: ${{ github.event.issue.number }} | |
ISSUE_TITLE: ${{ github.event.issue.title }} | |
USER_LOGIN: ${{ github.event.issue.user.login }} | |
USER_ID: ${{ github.event.issue.user.id }} | |
id: bot | |
- name: pull-request-action | |
uses: vsoch/pull-request-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_PREFIX: "bot-" | |
PULL_REQUEST_FROM_BRANCH: bot-${{ github.event.issue.number }} | |
PULL_REQUEST_BRANCH: "main" | |
PULL_REQUEST_TOKEN: ${{ secrets.RMG_BUILD_AND_RELEASE }} | |
PULL_REQUEST_TITLE: ${{ github.event.issue.title }} | |
PULL_REQUEST_BODY: "Hi, I'm the rmg bot updating ${{ github.event.issue.title }} on behalf of ${{ github.event.issue.user.login }}.\nThis should fix #${{ github.event.issue.number }}\n\n${{ steps.bot.outputs.REVIEW_URLS }}" | |
PULL_REQUEST_UPDATE: true |