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.
This pull request pairs with ODNZSL/nzsl-infrastructure#3 to automatically publish prerelease or production Signbank databases to the appropriate S3 bucket (UAT or Production).
I've adjusted the dictionary export workflow so that an environment must be specified - either Prerelease or Production. Based on the input environment, the workflow exports either a prerelease or production database, uploads it to S3, and if it's a production build, outputs the resulting database as a build artifact on the actions run.
An example of a prerelease run, with the file uploaded to S3:
https://github.com/ODNZSL/nzsl-dictionary-scripts/actions/runs/7201324009
An example of a production run, with the attached artifcacts and file uploaded to S3:
https://github.com/ODNZSL/nzsl-dictionary-scripts/actions/runs/7201414593
A neat thing about environments is that they can have branch protection rules attached to them. This prevents workflows that use that environment from running unless it meets the protection rules. As an example, I've activated a branch protection rule that only allows the workflow to be run against the 'main' branch, as shown in this build:
https://github.com/ODNZSL/nzsl-dictionary-scripts/actions/runs/7201433151
Once this PR is merged, I'd recommend we put the same rule in place for the prerelease export.
Note: I will of course squash merge, this was more iterative than I had planned 😆