create-pr #27
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: 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.get_pr_url.outputs.pr-url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Payload extraction | |
id: payload | |
run: | | |
echo "VERSION=${{ github.event.client_payload.version }}" >> $GITHUB_ENV | |
echo "COMMENT_LINK=${{ github.event.client_payload.comment_link }}" >> $GITHUB_ENV | |
echo "PR-URL=${{ github.event.client_payload.pr-url }}" >> $GITHUB_ENV | |
echo "TIME=${{ github.event.client_payload.time }}" >> $GITHUB_ENV | |
echo "SEVERITY=${{ github.event.client_payload.severity }}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: make install | |
- name: Fetch comment body and save to file | |
run: make fetch-comment COMMENT_LINK=${{ env.COMMENT_LINK }} VERSION=${{ env.VERSION }} | |
- name: Update entrypoint_release | |
run: make update-version VERSION=${{ env.VERSION }} TIME=${{ env.TIME }} SEVERITY=${{ env.SEVERITY }} | |
- name: Make Pull Request | |
id: pr | |
uses: ./.github/workflows/make-pull-request | |
with: | |
commit-files: ./ | |
commit-message: Create release notes for ${{ env.VERSION }} | |
app-id: ${{ secrets.PR_APP_ID}} | |
app-token: ${{ secrets.PR_APP_TOKEN}} | |
pr-reviewer: ${{ env.PR_REVIEWER }} | |
branch-name: release-notes-${{ env.VERSION }} | |
pr-title: 🚀 Release notes for ${{ env.VERSION }} | |
pr-body: | | |
This PR was generated automatically 🤖 | |
${{ env.PR-URL }} | |
pr-base: main | |
- name: Get the pull request URL | |
id: get_pr_url | |
run: | | |
echo "::set-output name=pr-url::$(cat pr_url.txt)" | |
alert: | |
runs-on: ubuntu-latest | |
needs: [create-pr-to-update] | |
steps: | |
- name: Report | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
🚀 New iOS release notes have been created, please check them out: | |
PR: | |
${{ needs.create-pr-to-update.outputs.pr-url }} |