-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into admin-ui-1846
- Loading branch information
Showing
85 changed files
with
630 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,22 @@ | ||
name: release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
jans_release_as: | ||
description: 'Release version for the python projects, admin ui, docker images, and helm charts' | ||
required: true | ||
default: '0.0.0-nightly' | ||
mega_release_as: | ||
description: 'Mega release version' | ||
required: true | ||
default: '0.0.0-nightly' | ||
next_jans_release_as: | ||
description: 'next anticipated jans Mega release version' | ||
required: true | ||
default: '0.0.0-nightly' | ||
next_mega_release_as: | ||
description: 'next anticipated Mega release version' | ||
required: true | ||
default: '0.0.0-nightly' | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
mega-release-pr: | ||
release-mega-pr: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
- uses: googleapis/release-please-action@v4 | ||
id: release-please | ||
with: | ||
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "mo-auto" | ||
git config user.email "[email protected]" | ||
git config --global user.signingkey "${{ steps.import_gpg.outputs.keyid }}" | ||
git config --global pull.rebase true | ||
- name: Prepare release | ||
run: | | ||
# echo "Install helm docs | ||
mkdir helmtemp | ||
cd helmtemp | ||
HELM_DOCS_VERSION=$(curl "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-) | ||
curl -sSL https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz -o helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz | ||
tar xvf helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz | ||
sudo cp helm-docs /usr/local/bin/ | ||
cd .. | ||
rm -rf helmtemp | ||
VERSION=${{ github.event.inputs.mega_release_as }} | ||
JANS_VERSION=${{ github.event.inputs.jans_release_as }} | ||
SETUP_VERSION=${{ github.event.inputs.jans_release_as }} | ||
DOCKER_VERSION=${{ github.event.inputs.jans_release_as }} | ||
ADMIN_UI_VERSION=${{ github.event.inputs.jans_release_as }} | ||
HELM_RELEASE=${{ github.event.inputs.mega_release_as }} | ||
echo "${{ secrets.MOWORKFLOWTOKEN }}" | gh auth login --with-token | ||
git checkout -b chore-$VERSION | ||
git pull origin chore-$VERSION || echo "Nothing to pull" | ||
chmod +x ./automation/release/release.sh | ||
source ./automation/release/release.sh | ||
modify_jans_commit_id | ||
modify_flex_commit_id | ||
git commit -a -S -m "chore: update admin ui and flex version" || echo "Nothing to commit" | ||
modify_version | ||
git commit -a -S -m "chore: modify app_info.json and python version files" || echo "Nothing to commit" | ||
modify_helm_chart | ||
git commit -a -S -m "chore: update flex helm chart image tags" || echo "Nothing to commit" | ||
modify_version_files | ||
git commit -a -S -m "chore: update version files" || echo "Nothing to commit" | ||
# Push the changes to the repository | ||
git push --set-upstream origin chore-$VERSION | ||
MESSAGE="chore: release $VERSION" | ||
PR=$(gh pr create --body "Auto generated $VERSION release" --title "${MESSAGE}" --label "autorelease:pending" || echo "PR already exists") | ||
# Report it in RocketChat | ||
curl -X POST -H 'Content-Type: application/json' --data "{\"alias\":\"Mo-Auto\",\"emoji\":\":robot:\",\"text\":\":rocket: I am getting ready for releasing Flex $VERSION.\",\"attachments\":[{\"title\":\"Gluu Release bot\",\"title_link\":\"$PR\",\"text\":\"$PR\",\"color\":\"#764FA5\"}]}" ${{ secrets.GITHUBUSERBEHAVIORROCKETCHATREPORTER }} | ||
release-type: simple | ||
token: ${{ secrets.MOWORKFLOWTOKEN }} |
Oops, something went wrong.