Skip to content

A GitHub Action to set up aws-cli v2 in linux job.

Notifications You must be signed in to change notification settings

hsupu/setup-awscli

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

setup-awscli

A GitHub Action to set up aws-cli v2 in linux job.

The action follows instructions in https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

You can directly copy the steps from action.yml to your job.

Usage:

- name: setup awscli
  uses: hsupu@setup-awscli@v1
  with:
    # these are default values
    install-dir: /usr/local/aws-cli
    bin-dir: /usr/local/bin

- name: s3 put-object
  # https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html#examples
  run: |
    echo Hello World > a.txt
    aws s3api put-object --bucket <bucket> --key <key> --body a.txt
  env:
    # https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    AWS_DEFAULT_REGION: 'us-east-1'

Notice: add action secrets: AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY.

You can also find AWS official-released GitHub Actions in https://github.com/aws-actions .

About

A GitHub Action to set up aws-cli v2 in linux job.

Resources

Stars

Watchers

Forks