-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from Axway/APIGOV-28116
APIGOV-28116 - don't run commits for nightly tests unless changes have been made
- Loading branch information
Showing
3 changed files
with
22 additions
and
6 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 |
---|---|---|
|
@@ -22,14 +22,29 @@ jobs: | |
go-version: 1.21 | ||
|
||
- name: Update SDK version in go.mod | ||
id: updatesdk | ||
working-directory: . | ||
run: | | ||
make dep-version sdk=main | ||
git config --global user.email [email protected] | ||
git config --global user.name builder-lphxmjtnt11 | ||
git commit --allow-empty -m "Updating SDK in go.mod" | ||
set +e # Grep succeeds with nonzero exit codes to show results. | ||
git status | grep modified | ||
if [ $? -eq 0 ] | ||
then | ||
set -e | ||
echo -e "Committing dependency changes" | ||
git config --global user.email [email protected] | ||
git config --global user.name builder-lphxmjtnt11 | ||
git commit --allow-empty -m "Updating SDK in go.mod" | ||
git push origin ${BRANCH_REF} | ||
echo "gomodChanged=y" >> $GITHUB_OUTPUT | ||
else | ||
set -e | ||
echo -e "No dependency changes since last run" | ||
echo "gomodChanged=n" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create Pull Request | ||
if: ${{ steps.updatesdk.outputs.gomodChanged == 'y' }} | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
|
@@ -40,6 +55,7 @@ jobs: | |
reviewers: dfeldick | ||
|
||
- name: Enable Pull Request Automerge | ||
if: ${{ steps.updatesdk.outputs.gomodChanged == 'y' }} | ||
run: gh pr merge APIGOV-UpdateSDKForTesting --admin --merge --subject "Merge branch APIGOV-UpdateSDKForTesting" | ||
env: | ||
GH_TOKEN: ${{ secrets.ACTION_ACCESS_TOKEN }} |
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