Skip to content

Instantly share code, notes, and snippets.

@rubenrangel
Created December 22, 2021 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubenrangel/46bbe96d270a6987db01762be0ab7d1e to your computer and use it in GitHub Desktop.
Save rubenrangel/46bbe96d270a6987db01762be0ab7d1e to your computer and use it in GitHub Desktop.
Projen config snippet to allow GitHub workflow access to AWS NPM CodeArtifact repository.
{
// ...contents of .projenrc.js
// See https://github.com/aws-actions/configure-aws-credentials#credentials
// Replace <...> with your info
workflowBootstrapSteps: [
{
name: 'Configure AWS Credentials',
uses: 'aws-actions/configure-aws-credentials@v1',
with: {
'aws-access-key-id': '${{ secrets.AWS_ACCESS_KEY_ID }}',
'aws-secret-access-key': '${{ secrets.AWS_SECRET_ACCESS_KEY }}',
'aws-region': '<AWS_REGION>',
},
},
{
name: 'AWS CodeArtifact Login',
run: 'aws codeartifact login --tool npm --domain <DOMAIN_NAME> --domain-owner <DOMAIN_ACCOUNT_ID> --repository <REPOSITORY_NAME>',
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment