Skip to content

Commit 46b51a9

Browse files
committed
upmerge v0.36->edge
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
2 parents 139622f + 3f751f6 commit 46b51a9

File tree

4 files changed

+57
-12
lines changed

4 files changed

+57
-12
lines changed

.github/config/en-custom.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,4 +1268,5 @@ bicepconfig
12681268
Bicepconfig
12691269
postgres
12701270
ReadOnly
1271-
DeployTimeConstant
1271+
DeployTimeConstant
1272+
postgres

.github/workflows/upmerge.yaml

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
# This workflow automates the process of upmerging changes from the current release branch to the edge branch.
2+
# During the course of a release, the release branch is the default branch so that PRs can be immediately
3+
# brought into the release without waiting for a new release. This workflow merges those changes into
4+
# the edge branch so that edge can be used as the basis for the next release branch.
5+
#
6+
# This workflow assumes that it is being triggered from the current release branch, but it could be triggered from
7+
# any branch, and it uses that branch as the source branch for merging into the edge branch.
8+
# The workflow is triggered manually via the workflow_dispatch event.
9+
#
10+
# The workflow performs the following steps:
11+
# 1. Checks out the edge branch.
12+
# 2. Configures git with a user name and email.
13+
# 3. Creates a new branch from edge.
14+
# 4. Merges changes from the branch executing the workflow into the edge branch created in the previous step.
15+
# 5. Pushes the new branch if there are changes.
16+
# 6. Creates a pull request to merge the new branch into edge.
17+
18+
# Example:
19+
# The current release branch is v0.36. We are creating the new release for v0.37.
20+
# The release person manually triggers this workflow from branch v0.36. The workflow runs, which does the following
21+
# 1. A new branch is created named upmerge/2024-07-31-98b9. The source branch is edge.
22+
# 2. Changes from branch v0.36 are merged into branch upmerge/2024-07-31-98b9.
23+
# 3. A PR is created from branch upmerge/2024-07-31-98b9 --> edge. The workflow finishes and reports success.
24+
125
name: Upmerge docs to edge
226

327
on:
@@ -8,31 +32,51 @@ jobs:
832
name: Upmerge docs to edge
933
runs-on: ubuntu-latest
1034
steps:
35+
36+
# Checkout the edge branch
1137
- uses: actions/checkout@v4
1238
with:
1339
ref: edge
1440
# https://github.com/actions/checkout/issues/125#issuecomment-570254411
1541
fetch-depth: 0
42+
1643
- name: Configure git
1744
run: |
1845
git config --global user.email "radiuscoreteam@service.microsoft.com"
1946
git config --global user.name "Radius CI Bot"
47+
48+
# Create a new branch from edge. This branch will be used to PR back into edge.
2049
- name: Create new branch
2150
run: |
2251
export DATE=$(date +%Y-%m-%d)
2352
export RAND=$(openssl rand -hex 2)
24-
echo "BRANCH_NAME=upmerge/$DATE-$RAND" >> $GITHUB_ENV
25-
git checkout -b upmerge/$DATE-$RAND
53+
export BRANCH_NAME=upmerge/$DATE-$RAND
54+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
55+
git checkout -b $BRANCH_NAME
56+
57+
# Merge changes from the github.ref branch, i.e., the branch from which the workflow is triggered. That
58+
# branch is assumed to be the current release branch, but could be any branch.
59+
# If there are no changes, stop the workflow.
2660
- name: Upmerge docs
2761
run: |
2862
export SOURCE_BRANCH=$(basename ${{ github.ref }})
2963
echo "Upmerging docs from $SOURCE_BRANCH to edge"
3064
git fetch origin $SOURCE_BRANCH
31-
git merge --no-commit origin/$SOURCE_BRANCH
32-
git reset HEAD docs/config.toml docs/layouts/partials/hooks/body-end.html
33-
git commit -m "Upmerge to edge"
34-
git push --set-upstream origin $BRANCH_NAME
65+
66+
git merge -m "Upmerge to edge" origin/$SOURCE_BRANCH
67+
68+
if git diff --quiet edge; then
69+
echo "No changes to merge from $SOURCE_BRANCH to edge"
70+
echo "NO_CHANGES=true" >> $GITHUB_ENV
71+
else
72+
echo "Pushing $BRANCH_NAME for PR to edge"
73+
git reset HEAD docs/config.toml docs/layouts/partials/hooks/body-end.html
74+
git push --set-upstream origin $BRANCH_NAME
75+
fi
76+
77+
# Create a PR from the new branch to edge
3578
- name: Create pull request
79+
if: env.NO_CHANGES != 'true'
3680
env:
3781
GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT}}
3882
run: gh pr create --title "Upmerge to edge" --body "Upmerge to edge (kicked off by @${{ github.triggering_actor }})" --base edge --head $BRANCH_NAME

docs/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
baseURL = "https://edge.docs.radapp.io/"
1+
baseURL = "https://docs.radapp.io/"
22
languageCode = "en-us"
33
title = "Radius Docs"
44
theme = "docsy"
@@ -67,17 +67,17 @@ tag = "tags"
6767

6868
[params]
6969
copyright = "The Radius Authors. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see the https://linuxfoundation.org/trademark-usage/ page."
70-
version = "edge"
70+
version = "v0.36"
7171
tag_version = "latest"
72-
chart_version = "0.26.0"
72+
chart_version = "0.36.0"
7373

7474
# Algolia Search
7575
algolia_docsearch = true
7676

7777
# GitHub Information
7878
github_repo = "https://github.com/radius-project/docs"
7979
github_subdir = "docs"
80-
github_branch = "edge"
80+
github_branch = "v0.36"
8181
github_project_repo = "https://github.com/radius-project/radius"
8282

8383
# Versioning

docs/layouts/partials/hooks/body-end.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
container: '#docsearch',
66
appId: 'ED67NSVSZS',
77
apiKey: '21e2920c3a9c29b98cbc382694413f29',
8-
indexName: 'radapp-dev-edge',
8+
indexName: 'radapp-dev',
99
});
1010
</script>
1111
{{ end }}

0 commit comments

Comments
 (0)