-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Benefits: 1. Ease of use - straight from the PR page 2. Workflow runs will show on the PR checks¹ 3. Downstream PRs will be automatically updated with new PR changes 4. Simplified logic in reusable workflow ¹ In the case that a preview label already exists and another preview label is added, this results in the workflow for the label that already exists to appear as "skipped" because it has been skipped on the latest event trigger to avoid an unnecessary update.
- Loading branch information
Showing
5 changed files
with
56 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
name: "Preview on auspice.us" | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
# Run if PR has the label and is updated or is newly labeled with the label | ||
if: | | ||
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'preview on auspice.us')) || | ||
(github.event.action == 'labeled' && github.event.label.name == 'preview on auspice.us') | ||
uses: ./.github/workflows/preview_on_downstream_repo.yaml | ||
secrets: inherit | ||
with: | ||
repository: nextstrain/auspice.us |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Preview on nextstrain.org" | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
# Run if PR has the label and is updated or is newly labeled with the label | ||
if: | | ||
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'preview on nextstrain.org')) || | ||
(github.event.action == 'labeled' && github.event.label.name == 'preview on nextstrain.org') | ||
uses: ./.github/workflows/preview_on_downstream_repo.yaml | ||
secrets: inherit | ||
with: | ||
repository: nextstrain/nextstrain.org | ||
directory: auspice-client |
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