diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 428bdfc3d..a8af92555 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -29,6 +29,6 @@ jobs: - name: Smoking Test run: go run ./main/main.go - - run: make build + - run: make build - run: test -z $ACCESS_KEY_ID -a -z $ACCESS_KEY_SECRET || bash ./integration/ecs_test - run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/oidc.yml b/.github/workflows/oidc.yml new file mode 100644 index 000000000..9ea54cedc --- /dev/null +++ b/.github/workflows/oidc.yml @@ -0,0 +1,35 @@ +name: Test with configure-aliyun-credentials-action + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: "1.20" + + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Configure credentials + uses: aliyun/configure-aliyun-credentials-action@v1-beta + with: + role-to-assume: 'acs:ram::1325847523475998:role/github-action' + oidc-provider-arn: 'acs:ram::1325847523475998:oidc-provider/GitHub' + + - name: Build + run: make build + + - name: Who am I + run: out/aliyun sts GetCallerIdentity --region cn-hangzhou diff --git a/config/configuration.go b/config/configuration.go index 340192d72..1a91aae74 100644 --- a/config/configuration.go +++ b/config/configuration.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -136,7 +136,7 @@ func LoadProfileWithContext(ctx *cli.Context) (profile Profile, err error) { } } - //Load from flags + // Load from flags profile.OverwriteWithFlags(ctx) err = profile.Validate() return