Skip to content

Commit

Permalink
Checkout release workflow from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan committed May 4, 2024
1 parent c7457c8 commit 1526026
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/hotfix-branch-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ jobs:
# Change the Release workflow to work with the hotfix branch.
echo "Changing the Release workflow to work with the hotfix branch."
# Check out the release script and release workflow from master branch.
#
# Note: This is done due to the hotfix workflow for identity-apps was added recently and therefore
# the related changes to release script[1] are not present in the older app versions. We may be able to
# remove this line once the older app versions are not being used, as by that time, the updated release script
# will be present in app versions that need to be hotfixed.
#
# [1] https://github.com/wso2/identity-apps/pull/6049
git checkout master -- .github/workflows/scripts/release.sh
git checkout master -- .github/workflows/release-workflow.yml
# Change the branch name in the release.yml file.
sed -i '/branches: \[ master \]/s/master/hotfix-'"${TAG//\//\\/}"'/' .github/workflows/release-workflow.yml
sed -i 's/BRANCH: .*/BRANCH: hotfix-'"${TAG//\//\\/}"'/' .github/workflows/release-workflow.yml
Expand All @@ -106,14 +117,6 @@ jobs:
# Change the branch name in the pr-builder.yml file.
sed -i '/branches: \[ master \]/s/master/hotfix-'"${TAG//\//\\/}"'/' .github/workflows/pr-builder.yml
# Check out the release script from master branch.
#
# Note: This is done due to the hotfix workflow for identity-apps was added recently and therefore
# the related changes to release script are not present in the older app versions. We may be able to
# remove this line once the older app versions are not being used, as by that time, the updated release script
# will be present in app versions that need to be hotfixed.
git checkout master -- .github/workflows/scripts/release.sh
# Add only modified files, hotfix-pr-creation-template.yml file, and commit changes.
echo "Add only modified files."
git add -u
Expand Down

0 comments on commit 1526026

Please sign in to comment.