Skip to content

Commit

Permalink
chore: add v6 cherry-pick automation
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackySoul committed Sep 5, 2024
1 parent 1155141 commit 58ac773
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/pr_close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,44 @@ jobs:
action: upload
override_pr_number: ${{ inputs.pr_number_by_workflow_dispatch }}

v6:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'v6')
concurrency: ci-stable
runs-on: ubuntu-latest
name: v6 Patch
steps:
- name: Checkout (for forked PR)
if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id
uses: actions/checkout@v4

- name: Checkout (for maintainer's PR)
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
uses: actions/checkout@v4
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Set Git credentials
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Make patch
uses: VKCOM/gh-actions/VKUI/patch@main
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
directory: packages/vkui/
targetBranch: v6
needScreenshots: true

patch:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'patch')
concurrency: ci-stable
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pull_request_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
uses: actions/checkout@v4

- name: Patch
if: ${{ startsWith(github.event.pull_request.title, 'fix') }}
# TODO [>=7]: заменить условие после релиза v7 на ${ { startsWith(github.event.pull_request.title, 'fix') }}
if: false
uses: ./.github/actions/add-label-to-pull-request
with:
issue_number: ${{ github.event.pull_request.number }}
Expand Down

0 comments on commit 58ac773

Please sign in to comment.