Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
cloud

GitHub Action

Configure Cloud CLI

v1.0.0

Configure Cloud CLI

cloud

Configure Cloud CLI

Configure Cloud CLI, AWS, Aliyun, etc

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Configure Cloud CLI

uses: GlobeFishNG/setup-cloud-cli@v1.0.0

Learn more about this action in GlobeFishNG/setup-cloud-cli

Choose a version

Setup Cloud CLI

There are several profiles as below for our CI/CD kubernetes cluster.

  • aws-us (default)
  • aws-cn
  • aliyun
  • aliyun-prod

Below are 2 examples for Aliyun and AWS. After a profile is configured, cloud cli (aliyun or aws) will have proper permissions to manipulate corresponding cloud resources.

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
      - name: Setup Cloud CLI
        uses: GlobeFishNG/setup-cloud-cli@v1
        with:
          profile: aliyun
      - run: |
          aliyun oss cp oss://example-bucket/example-file.json .
jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
      - name: Setup Cloud CLI
        uses: GlobeFishNG/setup-cloud-cli@v1
        with:
          profile: aws-cn
      - run: |
          aws s3 cp s3://example-bucket/example-file.json .