Skip to content

Commit

Permalink
chore: change workflow push to aws private ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Jul 21, 2024
1 parent 0b1d400 commit 13e3fa4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/dev-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,22 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ var.ECR_REGION }}

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2

- name: Login to AliCloud Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -85,6 +95,8 @@ jobs:
greptime/greptimedb-operator-dev:${{ env.VERSION }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-operator-dev:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-operator-dev:${{ env.VERSION }}
${{ var.ECR_REGISTRY }}/greptime/greptimedb-operator-dev:latest
${{ var.ECR_REGISTRY }}/greptime/greptimedb-operator-dev:${{ env.VERSION }}
- name: Build and push initializer
uses: docker/build-push-action@v5
Expand All @@ -98,3 +110,5 @@ jobs:
greptime/greptimedb-initializer-dev:${{ env.VERSION }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-initializer-dev:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-initializer-dev:${{ env.VERSION }}
${{ var.ECR_REGISTRY }}/greptime/greptimedb-initializer-dev:latest
${{ var.ECR_REGISTRY }}/greptime/greptimedb-initializer-dev:${{ env.VERSION }}
13 changes: 5 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ on:

env:
GO_VERSION: "1.21"
REGION: us-east-1

jobs:
docker:
Expand All @@ -42,7 +41,7 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.REGION }}
aws-region: ${{ var.ECR_REGION }}

- name: Login to DockerHub
uses: docker/login-action@v3
Expand All @@ -59,8 +58,6 @@ jobs:

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Configure tag
shell: bash
Expand All @@ -79,8 +76,8 @@ jobs:
greptime/greptimedb-operator:${{ env.VERSION }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-operator:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-operator:${{ env.VERSION }}
public.ecr.aws/i8k6a5e1/greptime/greptimedb-operator:latest
public.ecr.aws/i8k6a5e1/greptime/greptimedb-operator:${{ env.VERSION }}
${{ var.ECR_REGISTRY }}/greptime/greptimedb-operator:latest
${{ var.ECR_REGISTRY }}/greptime/greptimedb-operator:${{ env.VERSION }}
- name: Build and push initializer
uses: docker/build-push-action@v5
Expand All @@ -93,8 +90,8 @@ jobs:
greptime/greptimedb-initializer:${{ env.VERSION }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-initializer:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-initializer:${{ env.VERSION }}
public.ecr.aws/i8k6a5e1/greptime/greptimedb-initializer:latest
public.ecr.aws/i8k6a5e1/greptime/greptimedb-initializer:${{ env.VERSION }}
${{ var.ECR_REGISTRY }}/greptime/greptimedb-initializer:latest
${{ var.ECR_REGISTRY }}/greptime/greptimedb-initializer:${{ env.VERSION }}
release:
name: Release the artifacts
Expand Down

0 comments on commit 13e3fa4

Please sign in to comment.