Adds workflow for automatic handling of stale PRs and issues, tidies other workflows and adds better logging (#24839)

* Tidy the code, better commenting when things go wrong

* text!

* stale labeller

* get the labels right

* avoid complications

* Update .github/workflows/merge_upstream_master.yml

* Update .github/workflows/merge_upstream_master.yml

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* makes the merge upstream thingy comment, and approve its generated workflows

* wow

* remove this, paradise bot reigns supreme

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
S34N
2024-03-28 23:39:31 +00:00
committed by GitHub
co-authored by Luc
parent 56b49fa86e
commit 89d6873c7e
3 changed files with 74 additions and 30 deletions
+5 -11
View File
@@ -15,34 +15,28 @@ jobs:
runs-on: ubuntu-22.04
steps:
- id: create_token
uses: tibdex/github-app-token@v2
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- run: echo "GH_TOKEN=${{ steps.create_token.outputs.token }}" >> "$GITHUB_ENV"
- name: 'Update Branch'
uses: actions/checkout@v4
env:
GH_TOKEN: ${{ steps.create_token.outputs.token }}
with:
token: ${{ steps.create_token.outputs.token }}
- name: Branch
env:
GH_TOKEN: ${{ steps.create_token.outputs.token }}
run: |
git branch -f nanomap-render
git checkout nanomap-render
git reset --hard origin/master
- name: 'Generate Maps'
env:
GH_TOKEN: ${{ steps.create_token.outputs.token }}
run: './tools/github-actions/nanomap-renderer-invoker.sh'
- name: 'Commit Maps and open PR'
env:
GH_TOKEN: ${{ steps.create_token.outputs.token }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "NanoMap Generation"