Sanitise repo names used as zip file names in AWS uploads #58
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.
aws-upload.yml
#57@D-Dulius and @Dominic-Duke: I've added you both as reviewers because you've recently expressed an interest in learning more about GitHub actions and workflows. Don't feel the need to formally review the PR unless you want to.
Verification
I used the version of the AWS upload action from this branch in a branch of BitSim that I am working on to replace inline code in the CI build with our reusable actions.
I confirmed that the zip file uploaded to S3 from the CI build on that branch now uses a lowercase name and that it now triggers the downstream AWS CD pipeline as a result:
Alternative Approaches
It's somewhat opaque to transform the repo name inside this action. I can't think of an obvious problem with that for our typical use cases, but perhaps some use cases will require the repo name to remain in its original format for some reason.
Another approach would be to add an optional param to the action to override the repo/zip file name if present and default to the current behaviour where no param is supplied. It would then be up to workflow calling the action to transform the repo name as appropriate before asking for the repo to be uploaded to S3.
That would be cleaner in some ways, but it's slightly more work and might be overkill. Let me know what you think.