forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust nightly and release workflows (openwallet-foundation#3210)
* Adjust nightly and release workflows Signed-off-by: jamshale <jamiehalebc@gmail.com> * Testing Signed-off-by: jamshale <jamiehalebc@gmail.com> * Test release Signed-off-by: jamshale <jamiehalebc@gmail.com> * Revert test release Signed-off-by: jamshale <jamiehalebc@gmail.com> --------- Signed-off-by: jamshale <jamiehalebc@gmail.com>
- Loading branch information
Showing
4 changed files
with
63 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Check if PR is a release | ||
description: "Checks if the PR is a release" | ||
|
||
outputs: | ||
is_release: | ||
description: "Is this a release?" | ||
value: ${{ steps.check_if_release.outputs.is_release }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check if PR is a release | ||
shell: bash | ||
id: check_if_release | ||
continue-on-error: true | ||
run: | | ||
# Get the diff between the current commit and the last merge commit on the upstream/main branch | ||
git remote add upstream https://github.com/hyperledger/aries-cloudagent-python.git | ||
git fetch upstream | ||
last_merge=$(git rev-list --no-merges -n 1 upstream/main) | ||
echo event = ${{ github.event_name }} | ||
echo last upstream commit = "$last_merge" | ||
echo current pr commit = "${{ github.sha }}" | ||
echo Will exit with code 1 if the pull request is not a release | ||
changes=$(git diff "${{ github.sha }}" "$last_merge" pyproject.toml) | ||
# Extract the version of aries-cloudagent from the diff of pyproject.toml | ||
version=$(echo "$changes" | grep -A1 'name = "aries_cloudagent"' | head -n 2 | tail -n 1 | awk '{print $3}' | tr -d '"') | ||
echo "$version" | ||
if [ "$version" ]; then | ||
echo "This is a release because the aries-cloudagent version in pyproject.toml has changes" | ||
echo is_release=true >> $GITHUB_OUTPUT | ||
fi |
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 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 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