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

Add CI job to enable/disable GH PR merging #1508

Merged
merged 2 commits into from
Oct 27, 2022
Merged

Conversation

amarthadan
Copy link
Contributor

During the release flow, there's a time window when we need to "freeze" merging in order to release only what was tested during the testing of snapshot packages. I added a CI job whose sole purpose is just to check the GitHub secret and succeed or fail based on its value. I also added a command to the packaging container allowing us to set this secret to either true or false, effectively controlling whether the CI check will be successful and therefore whether the merge will be allowed.

@amarthadan amarthadan requested a review from a team October 25, 2022 12:42
@amarthadan amarthadan self-assigned this Oct 25, 2022
const binKey = sodium.from_base64(repositoryPublicKey, sodium.base64_variants.ORIGINAL);
const binSecret = sodium.from_string(`${flag}`);

//Encrypt the secret using LibSodium
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

@@ -56,6 +56,9 @@
"docker:scripts:docker:build:local": "yarn docker:scripts:docker:build --npm-registry local --npm-tag local --docker-tag local",
"docker:scripts:docker:publish": "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e DOCKERHUB_USERNAME -e DOCKERHUB_TOKEN api3/airnode-packaging:latest docker publish",
"docker:scripts:docker:publish:latest": "yarn docker:scripts:docker:publish",
"docker:scripts:github": "docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e GITHUB_TOKEN api3/airnode-packaging:latest github",
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to set the GH token when running this command. It might be nice to mention this somewhere. Maybe root README?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a README in the docker directory that I'm forgetting to update. I'll do that.

@amarthadan amarthadan force-pushed the packaging-docker-push branch 2 times, most recently from a52476a to 26d711b Compare October 27, 2022 06:42
@amarthadan amarthadan force-pushed the packaging-prevent-merge branch 2 times, most recently from 2ddc740 to ecb6557 Compare October 27, 2022 07:50
Copy link
Contributor

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@amarthadan amarthadan force-pushed the packaging-docker-push branch 2 times, most recently from 80a3781 to fc959af Compare October 27, 2022 10:46
Base automatically changed from packaging-docker-push to master October 27, 2022 12:55
@amarthadan amarthadan merged commit 66636e8 into master Oct 27, 2022
@amarthadan amarthadan deleted the packaging-prevent-merge branch October 27, 2022 14:24
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