Skip to content
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 Signbank database to AWS S3 #23

Merged
merged 10 commits into from
Dec 19, 2023

Conversation

joshmcarthur
Copy link
Contributor

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

image

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

image

image

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

image

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 😆

Copy link

@jadedarko jadedarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar enough with github workflows to feel comfortable approving this, but from a surface level this looks like it works as intended

@joshmcarthur joshmcarthur merged commit c271c7d into main Dec 19, 2023
2 of 3 checks passed
@joshmcarthur joshmcarthur deleted the feature/upload-prerelease-database branch December 19, 2023 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants