-
Notifications
You must be signed in to change notification settings - Fork 2k
Make 'spot' Configurable Based on Event #23333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kalverra
wants to merge
13
commits into
develop
Choose a base branch
from
noSpot
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5394cb5
Make 'spot' configurable based on action
kalverra 7bf98bd
Actually use the new action
kalverra 2b2a345
prettier
kalverra 14235a1
Cleanup
kalverra 18a0d74
reorder
kalverra 3d66011
reorder
kalverra fec8aae
comments
kalverra d6b3751
Merge
kalverra 86eb654
Remove bad sha input
kalverra e5e7a4d
Spread the good word
kalverra 557fb1d
Full audit of spot + families
kalverra 1b82bf4
Runner labels
kalverra 7e1cc81
Update versions
kalverra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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,46 @@ | ||
| name: Get Runner Spot Setting | ||
| description: Determines whether to use spot=co or spot=false based on merge queue and release flow rules. | ||
|
|
||
| outputs: | ||
| spot: | ||
| description: "The spot setting value ('co' or 'false')" | ||
| value: ${{ steps.eval-spot.outputs.spot }} | ||
| spot_param: | ||
| description: "The formatted spot parameter ('spot=co' or 'spot=false')" | ||
| value: ${{ steps.eval-spot.outputs.spot_param }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Evaluate Spot Strategy | ||
| id: eval-spot | ||
| shell: bash | ||
| env: | ||
| EVENT_NAME: ${{ github.event_name }} | ||
| REF: ${{ github.ref }} | ||
| REF_NAME: ${{ github.ref_name }} | ||
| run: | | ||
| IS_MERGE_QUEUE="false" | ||
| if [[ "$EVENT_NAME" == "merge_group" ]]; then | ||
| IS_MERGE_QUEUE="true" | ||
| fi | ||
|
|
||
| IS_RELEASE_BRANCH="false" | ||
| if [[ "$REF" == refs/heads/release/* || "$REF_NAME" == release/* ]]; then | ||
| IS_RELEASE_BRANCH="true" | ||
| fi | ||
|
|
||
| IS_RELEASE_TAG_OR_EVENT="false" | ||
| if [[ "$REF" == refs/tags/v* || "$EVENT_NAME" == "release" ]]; then | ||
| IS_RELEASE_TAG_OR_EVENT="true" | ||
| fi | ||
|
|
||
| if [[ "$IS_MERGE_QUEUE" == "true" || "$IS_RELEASE_BRANCH" == "true" || "$IS_RELEASE_TAG_OR_EVENT" == "true" ]]; then | ||
| echo "Run is merge_group or release flow. Using spot=false." | ||
| echo "spot=false" >> "$GITHUB_OUTPUT" | ||
| echo "spot_param=spot=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "Standard run. Using spot=co." | ||
| echo "spot=co" >> "$GITHUB_OUTPUT" | ||
| echo "spot_param=spot=co" >> "$GITHUB_OUTPUT" | ||
| fi | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.