GithubHelp home page GithubHelp logo

hartl3y94 / actions-aws-codeartifact-auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from advancedcsg-open/actions-aws-codeartifact-auth

0.0 0.0 0.0 339 KB

AWS CodeArtifact Auth

License: MIT License

JavaScript 100.00%

actions-aws-codeartifact-auth's Introduction

AWS CodeArtifact Auth

JavaScript Style Guide javscript-action status Quality Gate Status


Used to authorize with AWS CodeArtifact in order to publish packages.

Usage

Pre-requisites


Requires aws-actions/configure-aws-credentials to have been ran first with an appropriate role that can access CodeArtifact.

Inputs

region

The AWS region.

domain

The name of the domain that is in scope for the generated authorization token.

domain-owner

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

duration

The time, in seconds, that the generated authorization token is valid. Valid values are 0 and any number between 900 (15 minutes) and 43200 (12 hours). A value of 0 will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials. Defaults to 0.

Exported Variables

The action will export the following variables. These can then be used in conjunction with the package managers to publish artifacts.

NPM

Name Description
NPM_TOKEN The authentication token

PYPI

Name Description
TWINE_USERNAME The authentication username. Set as aws
TWINE_PASSWORD The authentication token

Maven

Name Description
MAVEN_USERNAME The authentication username. Set as aws
MAVEN_PASSWORD The authentication token

Nuget

Name Description
NUGET_AUTH_TOKEN The authentication token

Example


# .github/workflows/aws-codeartifact-auth.yml
name: AWS CodeArtifact Auth
on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
          aws-region: ${{ secrets.AWS_REGION }}
      - name: AWS CodeArtifact Auth
        uses: advancedcsg-open/actions-aws-codeartifact-auth
        with:
          region: ${{ secrets.AWS_REGION }}
          domain: ${{ secrets.AWS_CODEARTIFACT_DOMAIN }}
          domain-owner: ${{ secrets.AWS_CODEARTIFACT_DOMAIN_OWNER }}
      - name: Publish npm
        run: |
          npm publish

License

actions-aws-codeartifact-auth is licensed under the MIT License. See the LICENSE file for more info.

FOSSA Status

actions-aws-codeartifact-auth's People

Contributors

github-actions[bot] avatar paulmowat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.