ankurk91/install-aws-cli-action

Install AWS CLI in GitHub/Gitea self-hosted environments :beer:

โ˜… 3Forks 0ShellGitHub โ†—Compare

Project website โ†—

awsgitea-actions

README

Install AWS CLI Action

tests lint

Action to Install AWS CLI v2 on self-hosted Linux runners.

Features

  • Cache downloaded zip file to save bandwidth on concurrent runs ๐Ÿš€
  • Works for both x86_64 (Intel) and arm64 (ARM) architectures ๐Ÿ˜‰
  • Tested on GitHub and Gitea Actions
  • Skip installation if AWS CLI is already installed

Usage

on:
  push:
    branches:
      - main

jobs:
  Deployment:
    runs-on: ubuntu-latest

    steps:
      - name: Install AWS CLI v2
        uses: ankurk91/install-aws-cli-action@v1
        with:
          version: latest
          cache: true

      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v6
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: ${{ vars.AWS_REGION }}

Inputs

Name Required Default Description
version No latest AWS CLI v2 version to install, e.g. 2.31.11 or latest
cache No true Determines if downloaded zip files must be cached

Notes

Note

This action is using bash scripts which utilize the curl and unzip commands. Ensure your runner has these preinstalled.

Note

With version: latest the cache key rotates weekly, so a cached zip is never more than a week behind the latest AWS CLI release. Pinned versions are immutable and cached indefinitely.

Note

If AWS CLI is already present on the runner, installation is skipped, unless you pinned a version that does not match the installed one.

Attribution

This repo was inspired by quipper/setup-aws-cli-action

Ref links

License

This repo is licensed under MIT License.

Contributors

ankurk91

Issues