Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add push image to aws ecr #155

Merged
merged 5 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ 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:
Expand All @@ -49,6 +56,9 @@ jobs:
username: ${{ secrets.ALICLOUD_USERNAME }}
password: ${{ secrets.ALICLOUD_PASSWORD }}

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

- name: Configure tag
shell: bash
run: |
Expand All @@ -66,6 +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 }}
${{ 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 @@ -78,6 +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 }}
${{ var.ECR_REGISTRY }}/greptime/greptimedb-initializer:latest
${{ var.ECR_REGISTRY }}/greptime/greptimedb-initializer:${{ env.VERSION }}

release:
name: Release the artifacts
Expand Down
Loading