-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update upload action to avoid deprecation warning #40
Conversation
upload-artifact@v3 was deprecated. This was used by upload-pages-artifact@v1. v3 has the fix, see https://github.com/actions/upload-pages-artifact/releases/tag/v3.0.0
.github/workflows/pr-preview.yaml
Outdated
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
uses: actions/upload-pages-artifact@v3.0.0 |
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.
try using sha:
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8
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 think even actions/configure-pages@v3
needs to be changed to actions/configure-pages@v5
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.
Also we should change
thollander/actions-comment-pull-request@v2
to
thollander/actions-comment-pull-request@v3
I think this is the culprit
hilarious commit messages 😆
|
YES! Amine - I think you're onto something. The pull_request one is now failing with a new error. No idea why pull request target is still running, but it's possible if I get pull_request working we can shove this through and see that disappear. This also seems like a github bug because if this is running from the workflow on main, then it's showing the wrong workflow file in the summary. |
This is all so strange, why do you still have an action called pull_request_target? |
.github/workflows/pr-preview.yaml
Outdated
@@ -2,7 +2,7 @@ name: Deploy PR previews | |||
|
|||
on: | |||
# Only run on Staging | |||
pull_request_target: | |||
pull_request: |
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.
according to this: https://runs-on.com/github-actions/pull-request-vs-pull-request-target/#the-pull_request_target-event-trigger
pull_request_target has full access to secrets, so I guess now we have to find out how to access secrets without pull_request_target
could you also add |
Preview deployed at https://d1teub3jrrfss6.cloudfront.net/pr-40 |
upload-artifact@v3 was deprecated. This was used by upload-pages-artifact@v1. v3 has the fix, see
https://github.com/actions/upload-pages-artifact/releases/tag/v3.0.0