PR to inform @quill-icons update #133
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: PR to inform @quill-icons update | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: write | |
pull-requests: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
REPO_FULL_NAME: 'deriv-com/quill-icons-park' | |
REPO_NAME: 'quill-icons-park' | |
PR_BRANCH: 'quill-icons-update' | |
PR_TITLE: '[Quill-Icons] 🗂️ New version available!' | |
PR_BODY: | |
'This pull request was automatically created since a new version of [**@quill-icons**](https://github.com/deriv-com/quill-icons) is available. | |
Please merge this PR if everything looks good, so that @quill-icons-park can deploy the latest build to https://quill-icons-park.pages.dev/. | |
[Generated on $(date)]' | |
PR_LABEL: 'dependencies' | |
jobs: | |
Create-PR: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
repository: ${{env.REPO_FULL_NAME}} | |
token: ${{env.GITHUB_TOKEN}} | |
path: ${{env.REPO_NAME}} | |
- name: Set up Git identity | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Quill Squad" | |
- name: Commit to mediator branch | |
if: success() | |
run: | | |
cd "$REPO_NAME" | |
git checkout -b "$PR_BRANCH" | |
git pull origin master | |
npm version patch -m "build: 🚀 %s installs latest quill icons" | |
git push --set-upstream -f origin "$PR_BRANCH" | |
- name: Create Pull Request | |
if: success() | |
run: | | |
cd "$REPO_NAME" | |
gh pr close "$PR_BRANCH" || true | |
gh pr create --base master --head "$PR_BRANCH" --title "$PR_TITLE" --body "$PR_BODY" --label "$PR_LABEL" |