Skip to content

Commit

Permalink
ci: avoid login to AWS if AWS_CI_ROLE not configured (#865)
Browse files Browse the repository at this point in the history
#### Motivation

release-please.yml workflow should not try to login into AWS if
AWS_CI_ROLE secret is not configured.

#### Modification

add a condition to login in AWS only if AWS_CI_ROLE exists

#### Checklist

_If not applicable, provide explanation of why._

- [ ] Tests updated
- [ ] Docs updated
- [ ] Issue linked in Title
  • Loading branch information
paulfouquet authored Feb 15, 2024
1 parent 54301c5 commit 4fa0b2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure AWS Credentials
if: ${{env.AWS_CI_ROLE != ''}}
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4
with:
aws-region: ap-southeast-2
mask-aws-account-id: true
role-to-assume: ${{ secrets.AWS_CI_ROLE }}

- name: Login to Amazon ECR
if: ${{env.AWS_CI_ROLE != ''}}
id: login-ecr
uses: aws-actions/amazon-ecr-login@2fc7aceee09e9e4a7105c0d060c656fad0b4f63d # v1

Expand Down

0 comments on commit 4fa0b2e

Please sign in to comment.