Skip to content

Commit

Permalink
chore(release): 1.1.0
Browse files Browse the repository at this point in the history
# [1.1.0](v1.0.0...v1.1.0) (2020-08-16)

### Features

* basic info logging ([80c6579](80c6579))
  • Loading branch information
gliech committed Aug 16, 2020
1 parent 97f5515 commit 734e81d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12477,14 +12477,17 @@ async function run() {
const context = github.context;

// Retrieve repository public key and encrypt secret value
core.info("Retrieving repository public key")
const { data: repo_public_key } = await octokit.actions.getRepoPublicKey(context.repo);

core.info("Encrypting secret value")
const plain_value_bytes = Buffer.from(secret_value);
const public_key_bytes = Buffer.from(repo_public_key.key, 'base64');
const secret_value_bytes = sodium.seal(plain_value_bytes, public_key_bytes);
const signed_secret_value = Buffer.from(secret_value_bytes).toString('base64');

// Create or update secret
core.info("Updating repository secret")
const { status } = await octokit.actions.createOrUpdateRepoSecret({
...context.repo,
secret_name: secret_name,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-github-secret-action",
"version": "1.0.0",
"version": "1.1.0",
"private": "true",
"description": "Create or update a Github Secret",
"main": "dist/index.js",
Expand Down

0 comments on commit 734e81d

Please sign in to comment.