Skip to content
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

[DO NOT MERGE] Testing GitHub Actions #1127

Closed
wants to merge 1 commit into from

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Aug 27, 2023

Test PR to update node to 20.

However, because of pull_request_target, the GitHub Actions are executed against Node 18, and will only execute against node 20 after merging this PR. This means we wont catch any things that break in this PR, but only on master.

This would be resolved with #1126.

@frederikprijck frederikprijck temporarily deployed to internal August 27, 2023 18:45 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal August 27, 2023 18:45 — with GitHub Actions Inactive
github-merge-queue bot pushed a commit that referenced this pull request Aug 29, 2023
### Changes

Opening this PR as draft as a discussion starter to see if what I'm
doing here makes sense and would be something we would want.

The PR separates Browserstack into its own workflow, doing that removes
the need for using the `pull_request_target` trigger on the `Build and
Test` workflow, making it easier to make modifications to that workflow
file when needed.

It does keep the `pull_request_target` and `authorize` step for the
Browserstack workflow to guarantee our secrets are protected by the
means of a manual approval step.

**Why?**

Using `pull_request_target` does not run workflow changes on PRs as it
ensures it always runs in the context of the target branch. For example,
I[ opened a PR to update the NODE_VERSION to
20](#1127), but you will
notice that it still uses node 18 to execute the PR's workflow. This
means that we will only know if it works with node20 on GitHub Actions
after merging it to master.

However, the only reason we use `pull_request_target` is for
Browserstack. If we separate Browserstack into its own workflow, we no
longer need `pull_request_target` on our main `Build and Test` workflow,
meaning in that case, the PR I opened would run against node 20 on the
PR level, and not after merging.

I'm not yet sure if and how this will work for automating our release,
as I know it becomes really complicated when u have separate workflows.
But we already have the publish in a separate workflow anyway, so adding
a 3rd one doesn't necessarily add additional complexity, I think.

Unrelated, but also Drops --include=dev from npm ci, as we don't need
that. But same goes for changes like this. We have no way to identify
this works before merging this PR, because of the usage of
`pull_request_target`, which (as mentioned above) is not needed to build
our SDK and run its tests.

### Checklist

- [x] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
- [x] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
- [x] All code quality tools/guidelines have been run/followed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant