-
Notifications
You must be signed in to change notification settings - Fork 123
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
ci: upgraded ruby/setup-ruby action from version v1.152.0 to v1.178.0 #233
Conversation
…oken for forked PRs
.github/workflows/main.yml
Outdated
environment: ${{ github.event.pull_request.head.repo.fork && 'external' || 'internal' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authorize step is required when u use pull_request_target
in the on
on line 3. If u use pull_request
, authorize has no purpose.
You should ask your self:
- should codecov work for forks?
- if yes => use pull_request_target and authorize
- if no => keep pull_request and drop authorize.
pull_request does not expose secrets to forks, meaning it would fail as there are no token found. pull_request_target does expose tokens to secrets, so we need to protect it with authorization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @frederikprijck,
Thank you very much for the detailed explanation on the differences between the triggers pull_request
and pull_request_target
.
We would like to have codecov working for forks as well but it needs to be authorized first, hence proceeded with pull_request_target
.
Pushed the changes accordingly, please take a look again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On further discussion with @frederikprijck, we've decided it's okay to skip the code coverage check for the PR's raised from forks, as we will have a safety net for this when the PR is raised to master before release, hence changing it back to pull_request
and dropping authorize
… to enable actions running for forks too
293987b
to
1ffc886
Compare
.github/workflows/main.yml
Outdated
@@ -14,7 +14,7 @@ concurrency: | |||
|
|||
jobs: | |||
test: | |||
name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }} | |||
name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }}s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }}s | |
name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
README.md
Outdated
@@ -76,7 +76,7 @@ Then, run `carthage bootstrap --use-xcframeworks`. | |||
import JWTDecode | |||
``` | |||
|
|||
2. Decode the token | |||
2. Decode the token using the code snippet shared below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this added for CI purposes or is it an intended change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(for triggering a build, I mean)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, will revert them
.github/workflows/main.yml
Outdated
@@ -15,6 +15,7 @@ concurrency: | |||
jobs: | |||
test: | |||
name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }} | |||
environment: ${{ github.event.pull_request.head.repo.fork && 'external' || 'internal' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had added it previously, when we have introduced two different environments for secrets as part of using the authorize
step.
Removed it now, as we are no longer using authorize
, please take a look again.
📋 Changes
3.0.7
📎 References
https://github.com/auth0/JWTDecode.swift/actions/runs/9598725630/job/26470757827