mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-15 10:30:53 +02:00
Backport No Tag
This commit is contained in:
parent
e8dfed959e
commit
2a6c032883
20
.github/workflows/pr-backport-autotrigger.yml
vendored
20
.github/workflows/pr-backport-autotrigger.yml
vendored
@ -1,5 +1,7 @@
|
|||||||
name: Backport on Merge
|
name: Backport on Merge
|
||||||
|
|
||||||
|
# Note this workflow does not trigger the builds, be sure to manually tag the branches to trigger the builds
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [closed] # Later we check for merge so only PRs that go in can get backported
|
types: [closed] # Later we check for merge so only PRs that go in can get backported
|
||||||
@ -72,29 +74,33 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
echo "Backporting to beta ${{ steps.list-branches.outputs.beta }} and stable ${{ steps.list-branches.outputs.stable }}"
|
echo "Backporting to beta ${{ steps.list-branches.outputs.beta }} and stable ${{ steps.list-branches.outputs.stable }}"
|
||||||
|
|
||||||
# Fetch all history for all branches and tags
|
# Fetch all history for all branches and tags
|
||||||
git fetch --prune
|
git fetch --prune
|
||||||
# Checkout the beta branch
|
|
||||||
|
# Prepare the beta branch
|
||||||
git checkout ${{ steps.list-branches.outputs.beta }}
|
git checkout ${{ steps.list-branches.outputs.beta }}
|
||||||
# Cherry-pick the merge commit from the merged PR
|
|
||||||
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
|
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
|
||||||
echo "Cherry-pick to beta failed due to conflicts."
|
echo "Cherry-pick to beta failed due to conflicts."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
# Create new beta tag
|
|
||||||
|
# Create new beta branch/tag
|
||||||
git tag ${{ steps.list-branches.outputs.new_beta_tag }}
|
git tag ${{ steps.list-branches.outputs.new_beta_tag }}
|
||||||
# Push the changes and tag to the beta branch using PAT
|
# Push the changes and tag to the beta branch using PAT
|
||||||
git push origin ${{ steps.list-branches.outputs.beta }} --force
|
git push origin ${{ steps.list-branches.outputs.beta }} --force
|
||||||
git push origin ${{ steps.list-branches.outputs.new_beta_tag }}
|
#git push origin ${{ steps.list-branches.outputs.new_beta_tag }} # This step does not trigger the workflow, better to do it manually for now
|
||||||
# Checkout the stable branch
|
|
||||||
|
# Prepare the stable branch
|
||||||
git checkout ${{ steps.list-branches.outputs.stable }}
|
git checkout ${{ steps.list-branches.outputs.stable }}
|
||||||
# Cherry-pick the merge commit from the merged PR
|
# Cherry-pick the merge commit from the merged PR
|
||||||
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
|
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
|
||||||
echo "Cherry-pick to stable failed due to conflicts."
|
echo "Cherry-pick to stable failed due to conflicts."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
# Create new stable tag
|
|
||||||
|
# Create new stable branch/tag
|
||||||
git tag ${{ steps.list-branches.outputs.new_stable_tag }}
|
git tag ${{ steps.list-branches.outputs.new_stable_tag }}
|
||||||
# Push the changes and tag to the stable branch using PAT
|
# Push the changes and tag to the stable branch using PAT
|
||||||
git push origin ${{ steps.list-branches.outputs.stable }} --force
|
git push origin ${{ steps.list-branches.outputs.stable }} --force
|
||||||
git push origin ${{ steps.list-branches.outputs.new_stable_tag }}
|
#git push origin ${{ steps.list-branches.outputs.new_stable_tag }} # This step does not trigger the workflow, better to do it manually for now
|
||||||
|
Loading…
x
Reference in New Issue
Block a user