Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/scripts/validate_bicep.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

# set the bicep binary name based on the OS
if os.name == 'nt':
bicep_bin = 'rad-bicep.exe'
bicep_bin = 'bicep.exe'
home_path = os.environ['USERPROFILE']
else:
bicep_bin = 'rad-bicep'
bicep_bin = 'bicep'
home_path = os.environ['HOME']

# set the default Bicep path based on the runner
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/upmerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
upmerge:
name: Upmerge samples to edge
runs-on: ubuntu-24.04
env:
NO_CHANGES: 'false'
timeout-minutes: 5
permissions:
contents: write
Expand Down Expand Up @@ -66,19 +68,36 @@ jobs:
# 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.
# Manual recovery (local):
# git fetch origin
# git checkout -b upmerge/manual-<date> origin/edge
# git merge --no-commit origin/<source-branch>
# git status && git diff --name-only --diff-filter=U
# # resolve conflicts, then:
# git checkout origin/edge -- bicepconfig.json
# git add -A && git commit --signoff -m "Upmerge to edge"
# git push -u origin upmerge/manual-<date>
- 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 --no-commit "origin/${SOURCE_BRANCH}"

if ! git merge --no-commit "origin/${SOURCE_BRANCH}"; then
echo "::error::Merge conflicts detected while upmerging ${SOURCE_BRANCH} into edge."
echo "Conflicted files:"
git diff --name-only --diff-filter=U
git merge --abort
exit 1
fi

git checkout edge -- bicepconfig.json
git commit --signoff --message "Upmerge to edge"

if git diff --quiet edge; then
echo "No changes to merge from $SOURCE_BRANCH to edge"
echo "No changes to merge from ${SOURCE_BRANCH} to edge"
echo "NO_CHANGES=true" >> "${GITHUB_ENV}"
else
git commit --signoff --message "Upmerge to edge"
echo "Pushing ${BRANCH_NAME} for PR to edge"
git push --set-upstream origin "${BRANCH_NAME}"
fi
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:

- name: Setup and verify bicep CLI
run: |
curl -Lo rad-bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./rad-bicep
./rad-bicep --version
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./bicep
./bicep --version

- name: Verify Bicep files
run: python ./.github/scripts/validate_bicep.py
4 changes: 2 additions & 2 deletions samples/demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-bookworm AS build
FROM node:22-bookworm AS build
WORKDIR /usr/src/app

COPY package.json package-lock.json ./
Expand All @@ -9,7 +9,7 @@ RUN cd client && npm ci && npm cache clean --force
COPY . .
RUN npm run build

FROM node:20-alpine
FROM node:22-alpine
WORKDIR /usr/src/app

COPY --from=BUILD /usr/src/app/dist ./dist
Expand Down
Loading