Skip to content

Commit

Permalink
Merge pull request #51 from ZeroGachis/feature/pla-592
Browse files Browse the repository at this point in the history
feat: add build args for aws login to docker build workflow
  • Loading branch information
nicolasbriere1 authored Jan 4, 2024
2 parents 2b0cd1e + 64d27eb commit 43ee455
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
env:
VAULT_URL: ${{ inputs.VAULT_URL || vars.VAULT_URL || vars.PULLREQUEST_VAULT_URL }}
VAULT_GITHUB_ACTIONS_ROLE: ${{ inputs.vault_github_actions_role || vars.VAULT_GITHUB_ACTIONS_ROLE }}
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID || vars.PULL_REQUEST_AWS_ACCOUNT_ID }}
AWS_REGION: ${{ vars.AWS_REGION || vars.AWS_DEFAULT_REGION }}
outputs:
image-url: ${{ steps.meta.outputs.tags }}
image-version: ${{ steps.meta.outputs.version }}
Expand Down Expand Up @@ -88,6 +90,13 @@ jobs:
secret/data/github-actions-common/github/read-repo-token USERNAME | GH_ORG_READ_REPO_USER ;
secret/data/github-actions-common/github/read-repo-token PASSWORD | GH_ORG_READ_REPO_TOKEN ;
- name: Configure AWS Credentials
id: aws
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github_oidc

- name: Checkout
uses: actions/checkout@v4

Expand Down Expand Up @@ -126,3 +135,7 @@ jobs:
${{ inputs.build-args }}
GITHUB_USER=${{ steps.secrets.outputs.GH_ORG_READ_REPO_USER }}
GITHUB_TOKEN=${{ steps.secrets.outputs.GH_ORG_READ_REPO_TOKEN }}
AWS_ACCESS_KEY_ID=${{ steps.aws.outputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY=${{ steps.aws.outputs.aws-secret-access-key }}
AWS_SESSION_TOKEN=${{ steps.aws.outputs.aws-session-token }}

0 comments on commit 43ee455

Please sign in to comment.