-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move helm release to gateway release (#128)
Resolve BE-1307
- Loading branch information
1 parent
37b4dc1
commit 7c882b8
Showing
3 changed files
with
31 additions
and
122 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,35 +12,46 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.14.3 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_IAM_ROLE_GITHUB }} | ||
aws-region: us-east-1 | ||
|
||
- name: Log in to Amazon ECR | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
id: login-ecr | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
with: | ||
mask-password: 'true' | ||
registry-type: public | ||
mask-password: 'true' | ||
|
||
- name: Extract tag name | ||
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/gateway-}" >> $GITHUB_ENV | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
- name: Build and push container image to Amazon ECR | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile.gateway | ||
push: true | ||
tags: ${{ secrets.ECR_REGISTRY }}/beta9-gateway:${{ env.TAG_NAME }} | ||
build-args: --target=release | ||
load: false | ||
registry: ${{ steps.login-ecr.outputs.registry }} | ||
repository: ${{ steps.login-ecr.outputs.registry }}/beta9-gateway | ||
add_git_labels: true | ||
tag_with_ref: true | ||
tags: | | ||
${{ steps.login-ecr.outputs.registry }}/beta9-gateway:${{ github.ref_name }} | ||
${{ steps.login-ecr.outputs.registry }}/beta9-gateway:latest | ||
target: release | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
- name: Package and push Helm chart to Amazon ECR | ||
env: | ||
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
REGISTRY_ALIAS: n4e0e1y0 | ||
REPOSITORY: beta9-chart | ||
run: | | ||
cd deploy/charts | ||
helm package ./beta9 --dependency-update --version ${{ github.ref_name }} --app-version ${{ github.ref_name }} | ||
helm push $REPOSITORY-${{ github.ref_name }}.tgz oci://$REGISTRY |