Skip to content

Commit

Permalink
Update test push image to ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
bigzaja4 committed Jan 12, 2024
1 parent 310c774 commit 264a0f8
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,30 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Config AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.CORE_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CORE_AWS_SECRET_KEY }}
aws-region: ap-southeast-1

- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
registries: ${{ secrets.AWS_ECR_ACCOUNT_ID }}

- name: Build and push
uses: docker/build-push-action@v3
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: directus
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
tags: ${{ env.GHCR_IMAGE }}:${{ env.VERSION }}
tags: |
${{ env.GHCR_IMAGE }}:${{ env.VERSION }}
$ECR_REGISTRY/$ECR_REPOSITORY:${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
Expand Down

0 comments on commit 264a0f8

Please sign in to comment.