forked from reservoirprotocol/marketplace-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.11 KB
/
hotfix-flow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: create hotfix branch from latest tag
on:
pull_request:
labeled:
- hotfix
jobs:
Create-Hotfix-Branch:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: config
run: |
git config --global user.email "[email protected]" && git config --global user.name "artblocks eng"
- name: delete current hotfix branch
continue-on-error: true
run: |
git push origin -d hotfix && git branch -D hotfix
- name: get tags
run: |
git fetch --tags
- name: restore branch
run: |
git checkout -b ${{ github.event.pull_request.head.ref }} ${{ github.event.}}
- name: create hotfix branch
run: |
git checkout -b hotfix $(git describe --tags $(git rev-list --tags --max-count=1))
- name: cherry pick branch and push
run: |
git cherry-pick $(git merge-base main ${{ github.event.pull_request.head.ref }})..${{ github.event.pull_request.head.ref }} --strategy-option=theirs
- name: push
run: |
git push origin hotfix