Skip to content

Commit

Permalink
Move helm release to gateway release (#128)
Browse files Browse the repository at this point in the history
Resolve BE-1307
  • Loading branch information
nickpetrovic authored Apr 9, 2024
1 parent 37b4dc1 commit 7c882b8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 122 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/deploy-gateway.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/release-chart.yml

This file was deleted.

51 changes: 31 additions & 20 deletions .github/workflows/release-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7c882b8

Please sign in to comment.