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

Fix upmerge workflow to ignore bicepconfig #1880

Merged
merged 2 commits into from
Oct 24, 2024
Merged
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
7 changes: 5 additions & 2 deletions .github/workflows/upmerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ jobs:
# Merge changes from the github.ref branch, i.e., the branch from which the workflow is triggered. That
# branch is assumed to be the current release branch, but could be any branch.
# If there are no changes, stop the workflow.
# We ignore the bicepconfig.json file because we don't want to overwrite the version in the edge branch.
- name: Upmerge samples
run: |
export SOURCE_BRANCH=$(basename ${{ github.ref }})
echo "Upmerging samples from $SOURCE_BRANCH to edge"
git fetch origin $SOURCE_BRANCH
git merge -m "Upmerge to edge" origin/$SOURCE_BRANCH
git merge --no-commit origin/$SOURCE_BRANCH
git checkout edge -- bicepconfig.json
git commit -m "Upmerge to edge"
kachawla marked this conversation as resolved.
Show resolved Hide resolved

if git diff --quiet edge; then
echo "No changes to merge from $SOURCE_BRANCH to edge"
Expand All @@ -77,4 +80,4 @@ jobs:
if: env.NO_CHANGES != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT}}
run: gh pr create --title "Upmerge to edge" --body "Upmerge to edge (kicked off by @${{ github.triggering_actor }})" --base edge --head $BRANCH_NAME
run: gh pr create --title "Upmerge to edge" --body "Upmerge to edge (kicked off by @${{ github.triggering_actor }})" --base edge --head $BRANCH_NAME