-
Notifications
You must be signed in to change notification settings - Fork 79
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
Upload pages artifact with upload-artifact v4-beta #78
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e699324
Upload pages artifact with upload-artifact@v4-beta
konradpabjan ecdd3ed
Switch to using download@v4-beta
konradpabjan ef95519
Unique artifact name per job
konradpabjan 241a975
Correct artifact name during download
konradpabjan eb31309
Update artifact names in tests
konradpabjan 1228e65
Update action.yml
konradpabjan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
To date, we've required the artifact name to be exactly
github-pages
, but I suppose we can remove that requirement for Actions Artifacts V4 so long as we are relying on the artifact ID instead of having to search for the correct artifact. 👍🏻Speaking of which, shouldn't
actions/download-artifact@v4-beta
be taking in theartifact-id
as an input parameter? 🤔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.
actions/download-artifact@v4-beta
could work with just artifact IDs however we decided against that for a number of reasons (at least for now):v3
->v4
since the behavior stays largely the sameWith regards to the name being exactly
github-pages
We actually have two potential routes we can go downOption 1
Make
actions/deploy-pages
still rely on theartifact_name
. We can use the octokit rest client similar to what we do here and make a call to the list artifacts for workflow run API with a name parameter and then we will be able to confirm it exists + have an ID and pass that into the call to make a deployment.Pros:
Cons:
Option 2
Make
actions/deploy-pages
have a requiredartifact_id
input and get rid of theartifact_name
. This will prevent us from having to make an extra HTTP call to the list artifacts APIPros:
Cons:
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.
Thanks for the writeup!
I'm still a bit surprised that
download-artifact
doesn't at least have the option to use an artifact ID as an input parameter given thatupload-artifact
is now outputting that, but I acknowledge this is all still in-flux. 🤔Sorry, I was a bit off here in general 🤦🏻♂️ as we do allow alternative names for the artifact in
actions/deploy-pages
:https://github.com/actions/deploy-pages/blob/fa86ad3bc1471ec672d8cb66a92c22eb13390670/action.yml#L24-L27
We can talk through the options for
deploy-pages
more in the future, though I think I am liking Option 1 offhand after all since it will still give us the opportunity to warn about the size of the artifact on the action side. Not a hard requirement but a nicety. 👍🏻 Either way, that decision need not block this PR. 🚀