Skip to content

Commit

Permalink
Upmerge/2024 08 16 (#1199)
Browse files Browse the repository at this point in the history
* Update docs for v0.36.0

* Update auto-generated documentation (#1151)

* Autogenerate reference docs

Signed-off-by: rad-ci-bot <rad-ci-bot@users.noreply.github.com>

* Update en-custom.txt 

Signed-off-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>

---------

Signed-off-by: rad-ci-bot <rad-ci-bot@users.noreply.github.com>
Signed-off-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>
Co-authored-by: rad-ci-bot <rad-ci-bot@users.noreply.github.com>
Co-authored-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>

* Add HowTo tutorial to configure Terraform Custom Provider (#1162)

* add howto doc for tf custom provider config

* unsaved files

* update per comments

* update for conflicts

* extra space

* extra space

* further comments

* capitalizing Environment

* one more change

---------

Signed-off-by: Lakshmi Javadekar <103459615+lakshmimsft@users.noreply.github.com>

* correct highlight (#1164)

* Update index.md (#1160)

Signed-off-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>

* Add envSecrets block to HowTo Custom Provider tutorial (#1166)

* adding envSecrets

* updated per suggestion

* removing port input in config (#1167)

* Fix upmerge workflow error when no changes (#1192)

Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>

* addressing comments

Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>

* addressing comments

Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>

---------

Signed-off-by: rad-ci-bot <rad-ci-bot@users.noreply.github.com>
Signed-off-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>
Signed-off-by: Lakshmi Javadekar <103459615+lakshmimsft@users.noreply.github.com>
Signed-off-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
Co-authored-by: Radius CI Bot <radiuscoreteam@service.microsoft.com>
Co-authored-by: rad-ci-bot <103787451+rad-ci-bot@users.noreply.github.com>
Co-authored-by: rad-ci-bot <rad-ci-bot@users.noreply.github.com>
Co-authored-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>
Co-authored-by: Lakshmi Javadekar <103459615+lakshmimsft@users.noreply.github.com>
Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com>
  • Loading branch information
7 people authored Aug 16, 2024
1 parent 139622f commit fad7c64
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/config/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1268,4 +1268,5 @@ bicepconfig
Bicepconfig
postgres
ReadOnly
DeployTimeConstant
DeployTimeConstant
postgres
56 changes: 50 additions & 6 deletions .github/workflows/upmerge.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# This workflow automates the process of upmerging changes from the current release branch to the edge branch.
# During the course of a release, the release branch is the default branch so that PRs can be immediately
# brought into the release without waiting for a new release. This workflow merges those changes into
# the edge branch so that edge can be used as the basis for the next release branch.
#
# This workflow assumes that it is being triggered from the current release branch, but it could be triggered from
# any branch, and it uses that branch as the source branch for merging into the edge branch.
# The workflow is triggered manually via the workflow_dispatch event.
#
# The workflow performs the following steps:
# 1. Checks out the edge branch.
# 2. Configures git with a user name and email.
# 3. Creates a new branch from edge.
# 4. Merges changes from the branch executing the workflow into the edge branch created in the previous step.
# 5. Pushes the new branch if there are changes.
# 6. Creates a pull request to merge the new branch into edge.

# Example:
# The current release branch is v0.36. We are creating the new release for v0.37.
# The release person manually triggers this workflow from branch v0.36. The workflow runs, which does the following
# 1. A new branch is created named upmerge/2024-07-31-98b9. The source branch is edge.
# 2. Changes from branch v0.36 are merged into branch upmerge/2024-07-31-98b9.
# 3. A PR is created from branch upmerge/2024-07-31-98b9 --> edge. The workflow finishes and reports success.

name: Upmerge docs to edge

on:
Expand All @@ -8,31 +32,51 @@ jobs:
name: Upmerge docs to edge
runs-on: ubuntu-latest
steps:

# Checkout the edge branch
- uses: actions/checkout@v4
with:
ref: edge
# https://github.com/actions/checkout/issues/125#issuecomment-570254411
fetch-depth: 0

- name: Configure git
run: |
git config --global user.email "radiuscoreteam@service.microsoft.com"
git config --global user.name "Radius CI Bot"
# Create a new branch from edge. This branch will be used to PR back into edge.
- name: Create new branch
run: |
export DATE=$(date +%Y-%m-%d)
export RAND=$(openssl rand -hex 2)
echo "BRANCH_NAME=upmerge/$DATE-$RAND" >> $GITHUB_ENV
git checkout -b upmerge/$DATE-$RAND
export BRANCH_NAME=upmerge/$DATE-$RAND
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
git checkout -b $BRANCH_NAME
# 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.
- name: Upmerge docs
run: |
export SOURCE_BRANCH=$(basename ${{ github.ref }})
echo "Upmerging docs from $SOURCE_BRANCH to edge"
git fetch origin $SOURCE_BRANCH
git merge --no-commit origin/$SOURCE_BRANCH
git reset HEAD docs/config.toml docs/layouts/partials/hooks/body-end.html
git commit -m "Upmerge to edge"
git push --set-upstream origin $BRANCH_NAME
git merge -m "Upmerge to edge" origin/$SOURCE_BRANCH
if git diff --quiet edge; then
echo "No changes to merge from $SOURCE_BRANCH to edge"
echo "NO_CHANGES=true" >> $GITHUB_ENV
else
echo "Pushing $BRANCH_NAME for PR to edge"
git reset HEAD docs/config.toml docs/layouts/partials/hooks/body-end.html
git push --set-upstream origin $BRANCH_NAME
fi
# Create a PR from the new branch to edge
- name: Create pull request
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

0 comments on commit fad7c64

Please sign in to comment.