Skip to content

Commit

Permalink
[temp] automate auth-spa
Browse files Browse the repository at this point in the history
  • Loading branch information
brionmario committed Jan 18, 2024
1 parent 3e66641 commit cade746
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/asgardeo-auth-spa-version-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,24 @@ jobs:
echo "Checking out a new branch: $VERSION_BUMP_BRANCH"
git checkout -b "$VERSION_BUMP_BRANCH"
- name: 📊 Get the latest `@asgardeo/auth-spa` release version
id: get-latest-auth-spa-version
- name: Validate existing `@asgardeo/auth-spa` version
id: validate-existing-auth-spa-version
run: |
latest_release=$(curl -s https://api.github.com/repos/asgardeo/asgardeo-auth-spa-sdk/releases/latest | jq -r '.tag_name')
echo "::set-output name=version::${latest_release}"
tree
existing_version=$(grep -oP 'auth-spa-\K[0-9]+\.[0-9]+\.[0-9]+' apps/console/src/public/auth-spa-3.0.1.min.js)
echo "EXISTING_ASGARDEO_AUTH_VERSION=${existing_version}" >> $GITHUB_ENV
- name: Check if existing and latest versions match
id: check-version-match
run: |
existing_version=$(grep -oP 'auth-spa-\K[0-9]+\.[0-9]+\.[0-9]+' apps/console/src/public/auth-spa-3.0.1.min.js)
latest_release=$(curl -s https://api.github.com/repos/asgardeo/asgardeo-auth-spa-sdk/releases/latest | jq -r '.tag_name')
if [ "$existing_version" == "$latest_release" ]; then
echo "Versions match. Aborting further steps."
exit 0
fi
echo "EXISTING_ASGARDEO_AUTH_VERSION=${existing_version}" >> $GITHUB_ENV
echo "LATEST_ASGARDEO_AUTH_VERSION=${latest_release}" >> $GITHUB_ENV
# - name: 🎉 Create pull request
# id: create-pr
# run: |
Expand Down

0 comments on commit cade746

Please sign in to comment.