Skip to content

Resources: New templates of Guangzhou Metro #967

Resources: New templates of Guangzhou Metro

Resources: New templates of Guangzhou Metro #967

Workflow file for this run

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@v3
with:
token: ${{ secrets.RMG_BUILD_AND_RELEASE }}
- uses: actions/setup-node@v3
with:
node-version: '20'
- 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.RMT_SVC }}
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
# - name: Trigger check
# run: |
# echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
# echo "{\"name\":\"check\",\"head_sha\":\"$(git log -n 1 --pretty=%H)\"}" | gh api /repos/${{ github.repository }}/check-runs --input -