Skip to content

create-pr

create-pr #1

name: Update changelog
on:
repository_dispatch:
types: [create-pr]
env:
PR_REVIEWER: ERussel,leohar,valentunn,stepanLav
jobs:
create-pr-to-update:
runs-on: ubuntu-latest
outputs:
pr-url: ${{ steps.pr.outputs.pull-request-url }}
steps:
- uses: actions/checkout@v4
- name: Payload extraction
id: payload
run: |
echo "VERSION=${{ fromJSON(github.event.client_payload).version }}" >> $GITHUB_ENV
echo "COMMENT_LINK=${{ fromJSON(github.event.client_payload).comment_link }}" >> $GITHUB_ENV
echo "TIME=${{ fromJSON(github.event.client_payload).time }}" >> $GITHUB_ENV
echo "SEVERITY=${{ fromJSON(github.event.client_payload).severity }}" >> $GITHUB_ENV
- name: Fetch comment body and save to file
run: |
COMMENT_BODY=$(curl -s "${{ steps.payload.outputs.COMMENT_LINK }}")
echo "$COMMENT_BODY" > updates/changelogs/release/${{ steps.payload.outputs.VERSION }}.md
- name: Update entrypoint_release
run: python scripts/version_updater.py ${{ steps.payload.outputs.VERSION }} ${{ steps.payload.outputs.TIME }} ${{ steps.payload.outputs.SEVERITY }}
- name: Make Pull Request
id: pr
uses: ./.github/workflows/make-pull-request
with:
commit-files: ./
commit-message: Create release notes for ${{ steps.payload.outputs.VERSION }}
app-id: ${{ secrets.PR_APP_ID}}
app-token: ${{ secrets.PR_APP_TOKEN}}
pr-reviewer: ${{ env.PR_REVIEWER }}
branch-name: release-notes-${{ steps.payload.outputs.VERSION }}
pr-title: 🚀 Release notes for ${{ steps.payload.outputs.VERSION }}
pr-body: This PR was generated automatically 🤖
pr-base: master
alert:
runs-on: ubuntu-latest
needs: [create-pr-to-update]
if: always()
env:
GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- name: Report
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
🚀 New Android release notes have been created, please check them out:
PR:
${{ needs.create-pr-to-update.outputs.pr-url }}