Skip to content

GitHub action to mint temporary AWS IAM credentials based on GitHub permissions (client part)

Notifications You must be signed in to change notification settings

netlibs/iam-mint-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mint AWS temporary credentials from GitHub action

simply calls an API endpoint to swap GITHUB_TOKEN for minted STS token. You'll need to provide the backend to validate the token.

Usage from Workflow

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: netlibs/iam-mint-action@v3
      with:          
        endpoint: https://my.endpoint/token_issuer
        role: arn:aws:iam::<account>:role/<something>
        token: ${{ secrets.GITHUB_TOKEN }}
    # you can now use AWS-SDK based apps with ambient credentials, for exmaple:
    - name: AWS Login
      run: |
        endpoint=$(aws ecr get-authorization-token --region us-west-2 --output text --query 'authorizationData[].proxyEndpoint')
        aws ecr get-authorization-token --region us-west-2 --output text --query 'authorizationData[].authorizationToken' | base64 --decode | cut -d: -f2 | docker login -u AWS --password-stdin $endpoint
    

Options

  • token
  • endpoint
  • actor
  • project
  • region
  • profile

New Version

npm run build
git commit -a -m 'new version'
git tag -a -m "intial release" v1
git push --follow-tags

About

GitHub action to mint temporary AWS IAM credentials based on GitHub permissions (client part)

Resources

Stars

Watchers

Forks

Packages

No packages published