-
Notifications
You must be signed in to change notification settings - Fork 432
chore(ci): use OIDC and encrypt release secrets #1355
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
Merged
heitorlessa
merged 31 commits into
aws-powertools:develop
from
heitorlessa:chore/encrypt-release-secrets
Jul 22, 2022
Merged
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
3fe6947
chore(ci): confirm workflow_run event
heitorlessa 61a4922
chore: dummy for PR test
heitorlessa b44b462
chore: print full event depth
heitorlessa fd3fc0f
chore: print full workflow event depth
heitorlessa 2de2bac
chore: debug full event
heitorlessa 0bdac56
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa 879fcbe
chore(ci): experiment hardening origin
heitorlessa 3152552
Merge pull request #284 from heitorlessa/chore/dummy
heitorlessa b1973b2
chore(ci): experiment hardening origin
heitorlessa ab6fe51
fix(ci): unexpected symbol due to double quotes...
heitorlessa 79c4fbd
fix(ci): remove unsupported env in workflow_call
heitorlessa d5827e3
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa b9e357b
chore(ci): test default env
heitorlessa 9e1acc5
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa 53ecc24
fix(ci): only event is resolved in cond
heitorlessa cfaa4cc
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa e38e96e
chore(ci): test env expr
heitorlessa 7bea840
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa e81d6b3
fix(ci): cond doesnt support two expr w/ env
heitorlessa 038b88d
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa 93f56e9
chore(ci): test upstream job skip
heitorlessa c18e6a7
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa 8d1744a
Merge pull request #285 from heitorlessa/chore/skip-dep-workflow
heitorlessa 7f516ea
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa 59d0309
chore: remove leftover from fork one more time
heitorlessa 2ec7418
Merge branch 'develop' of https://github.com/heitorlessa/aws-lambda-p…
heitorlessa f9e724b
chore(ci): use OIDC creds and use encrypted secrets
heitorlessa 09cf051
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa 28edb26
chore: delete leftover
heitorlessa 35560e1
chore: remove leftover from fork one more time
heitorlessa def2f58
Merge branch 'chore/encrypt-release-secrets' of https://github.com/he…
heitorlessa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const { | ||
PR_ACTION, | ||
PR_AUTHOR, | ||
PR_BODY, | ||
PR_NUMBER, | ||
IGNORE_AUTHORS, | ||
LABEL_BLOCK, | ||
LABEL_BLOCK_REASON | ||
} = require("./constants") | ||
|
||
module.exports = async ({github, context, core}) => { | ||
if (IGNORE_AUTHORS.includes(PR_AUTHOR)) { | ||
return core.notice("Author in IGNORE_AUTHORS list; skipping...") | ||
} | ||
|
||
if (PR_ACTION != "opened") { | ||
return core.notice("Only newly open PRs are labelled to avoid spam; skipping") | ||
} | ||
|
||
const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?<issue>\d+)/; | ||
const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY); | ||
if (isMatch == null) { | ||
core.info(`No related issue found, maybe the author didn't use the template but there is one.`) | ||
|
||
let msg = "No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure."; | ||
await github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: msg, | ||
issue_number: PR_NUMBER, | ||
}); | ||
|
||
return await github.rest.issues.addLabels({ | ||
issue_number: PR_NUMBER, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: [LABEL_BLOCK, LABEL_BLOCK_REASON] | ||
}) | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.