-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run dependabot CI without GitHub secrets (#1204)
Due to https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/, Dependabot PRs don't have access to GH secrets. In particular, that means they can't run e2e tests, and can't deploy a preview app on NPM. So far, we have manually re-run the dependabot PRs to get access to the secrets. This commit makes it so that Dependabot PRs run without e2e tests or NPM preview, so that a human user does not need to be involved. To achieve that, any step of the workflow that requires a GH secret only gets executed if it isn't triggered by dependabot.
- Loading branch information
Showing
4 changed files
with
20 additions
and
8 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
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 |
---|---|---|
|
@@ -7,7 +7,10 @@ env: | |
jobs: | ||
unpublish-npm: | ||
runs-on: ubuntu-20.04 | ||
if: github.event.ref_type == 'branch' | ||
# Dependabot cannot access secrets, so it doesn't have a token to publish to NPM. | ||
# Since all the other jobs of this workflow depend on this one, skipping it should | ||
# skip the entire workflow. | ||
if: ${{github.event.ref_type == 'branch' && github.actor != 'dependabot'}} | ||
steps: | ||
- name: Prepare for unpublication from npm | ||
uses: actions/[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