mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
# Creates an entry in html/changelogs automatically, to eventually be compiled by compile_changelogs
|
|
name: Auto Changelog
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- closed
|
|
branches:
|
|
- master
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
auto_changelog:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.merged == true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Generate App Token
|
|
id: app-token-generation
|
|
uses: actions/create-github-app-token@v1
|
|
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
|
|
with:
|
|
app-id: ${{ secrets.APP_ID }}
|
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
env:
|
|
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
|
|
APP_ID: ${{ secrets.APP_ID }}
|
|
|
|
- name: Run auto changelog
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const { processAutoChangelog } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoChangelog.js')
|
|
await processAutoChangelog({ github, context })
|
|
github-token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
|