Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add if section in the restore branch step of the Release action #1248

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/PostCheckList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- [ ] Labels of this pull request are valid?
- [ ] All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
- [ ] The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BLOOM_GITHUB_TOKEN }}
16 changes: 15 additions & 1 deletion .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
new_version: ${{ steps.new_version.outputs.new_version }}
steps:
- name: Restore branch
if: github.event.pull_request.merged == true
uses: levonet/action-restore-branch@master
continue-on-error: true

- name: Install bloom
run: apt update && apt install -y python3-bloom git curl
Expand All @@ -50,9 +52,21 @@ jobs:
git config --global user.name "Release Bot"
git config --global user.email "[email protected]"
git config --global --add safe.directory /__w/scenario_simulator_v2/scenario_simulator_v2
git config --global credential.helper ${{ secrets.GITHUB_TOKEN }}
git config --global credential.helper ${{ secrets.BLOOM_GITHUB_TOKEN }}
git config pull.rebase false

- name: Copy branch to upstream
if: github.event.pull_request.head.repo.full_name != github.repository
env:
GITHUB_TOKEN: ${{ secrets.BLOOM_GITHUB_TOKEN }}
run: |
git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git
git fetch --all
git checkout fork/${{ github.event.pull_request.head.ref }}
git checkout -b ${{ github.event.pull_request.head.ref }}
git push origin ${{ github.event.pull_request.head.ref }}
git checkout origin master

- name: Get old version
id: old_version
run: |
Expand Down
Loading