-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update deprecated GitHub Actions syntax (#490)
* fix typo * retrieve PR SHA from python (not direct in workflow) * print test results to log * remove brackets from conditionals and var setting --------- Co-authored-by: Katherine Fairchild <[email protected]>
- Loading branch information
1 parent
cc481da
commit 4ae469c
Showing
3 changed files
with
18 additions
and
14 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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
check_test_results: | ||
name: Check if all tests have passed and PR meets automerge conditions | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.label.name == 'automerge-approved' }} | ||
if: github.event.label.name == 'automerge-approved' | ||
outputs: | ||
ALL_TESTS_PASS: ${{ steps.gettestresults.outputs.TEST_RESULTS }} | ||
steps: | ||
|
@@ -29,14 +29,16 @@ jobs: | |
- name: Get test results and ensure automergeable | ||
id: gettestresults | ||
run: | | ||
echo "Checking test results for PR head pr_head=$( python brainscore_vision/submission/actions_helpers.py get_pr_head )" | ||
echo "{TEST_RESULTS}={$( python brainscore_vision/submission/actions_helpers.py )}" >> $GITHUB_OUTPUT | ||
echo "Checking test results for PR head $( python brainscore_vision/submission/actions_helpers.py get_pr_head )" | ||
test_results=$( python brainscore_vision/submission/actions_helpers.py ) | ||
echo $test_results | ||
echo "TEST_RESULTS=$test_results" >> $GITHUB_OUTPUT | ||
automerge: | ||
name: If tests pass and PR is automergeable, approve and merge | ||
runs-on: ubuntu-latest | ||
needs: check_test_results | ||
if: ${{ needs.check_test_results.outputs.ALL_TESTS_PASS == 'True' }} | ||
if: needs.check_test_results.outputs.ALL_TESTS_PASS == 'True' | ||
steps: | ||
- name: Auto Approve | ||
uses: hmarr/[email protected] | ||
|
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