Skip to content

Minor improvements to Helm chart (#819) #90

Minor improvements to Helm chart (#819)

Minor improvements to Helm chart (#819) #90

Workflow file for this run

name: Build images
on:
push:
branches:
- main
env:
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
jobs:
build-dbmigrator-image:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Login to OCI Registry
id: login-ocir
uses: oracle-actions/[email protected]
with:
auth_token: ${{ secrets.OCI_AUTH_TOKEN }}
- name: Get clotributor dbmigrator OCIR repository
id: get-ocir-repository-dbmigrator
uses: oracle-actions/[email protected]
with:
name: clotributor/dbmigrator
compartment: ${{ secrets.OCI_COMPARTMENT_OCID }}
- name: Build and push dbmigrator image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
OCIR_REGISTRY: ${{ steps.login-ocir.outputs.ocir_endpoint }}
OCIR_REPOSITORY: ${{ steps.get-ocir-repository-dbmigrator.outputs.repo_path }}
run: |
docker build \
-f database/migrations/Dockerfile \
-t $ECR_REGISTRY/clotributor-dbmigrator:$GITHUB_SHA \
-t $OCIR_REPOSITORY:$GITHUB_SHA \
.
docker push $ECR_REGISTRY/clotributor-dbmigrator:$GITHUB_SHA
docker push $OCIR_REPOSITORY:$GITHUB_SHA
build-apiserver-image:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Login to OCI Registry
id: login-ocir
uses: oracle-actions/[email protected]
with:
auth_token: ${{ secrets.OCI_AUTH_TOKEN }}
- name: Get clotributor apiserver OCIR repository
id: get-ocir-repository-apiserver
uses: oracle-actions/[email protected]
with:
name: clotributor/apiserver
compartment: ${{ secrets.OCI_COMPARTMENT_OCID }}
- name: Build and push apiserver image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
OCIR_REGISTRY: ${{ steps.login-ocir.outputs.ocir_endpoint }}
OCIR_REPOSITORY: ${{ steps.get-ocir-repository-apiserver.outputs.repo_path }}
run: |
docker build \
-f clotributor-apiserver/Dockerfile \
-t $ECR_REGISTRY/clotributor-apiserver:$GITHUB_SHA \
-t $OCIR_REPOSITORY:$GITHUB_SHA \
.
docker push $ECR_REGISTRY/clotributor-apiserver:$GITHUB_SHA
docker push $OCIR_REPOSITORY:$GITHUB_SHA
build-registrar-image:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Login to OCI Registry
id: login-ocir
uses: oracle-actions/[email protected]
with:
auth_token: ${{ secrets.OCI_AUTH_TOKEN }}
- name: Get clotributor registrar OCIR repository
id: get-ocir-repository-registrar
uses: oracle-actions/[email protected]
with:
name: clotributor/registrar
compartment: ${{ secrets.OCI_COMPARTMENT_OCID }}
- name: Build and push registrar image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
OCIR_REGISTRY: ${{ steps.login-ocir.outputs.ocir_endpoint }}
OCIR_REPOSITORY: ${{ steps.get-ocir-repository-registrar.outputs.repo_path }}
run: |
docker build \
-f clotributor-registrar/Dockerfile \
-t $ECR_REGISTRY/clotributor-registrar:$GITHUB_SHA \
-t $OCIR_REPOSITORY:$GITHUB_SHA \
.
docker push $ECR_REGISTRY/clotributor-registrar:$GITHUB_SHA
docker push $OCIR_REPOSITORY:$GITHUB_SHA
build-tracker-image:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Login to OCI Registry
id: login-ocir
uses: oracle-actions/[email protected]
with:
auth_token: ${{ secrets.OCI_AUTH_TOKEN }}
- name: Get clotributor tracker OCIR repository
id: get-ocir-repository-tracker
uses: oracle-actions/[email protected]
with:
name: clotributor/tracker
compartment: ${{ secrets.OCI_COMPARTMENT_OCID }}
- name: Build and push tracker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
OCIR_REGISTRY: ${{ steps.login-ocir.outputs.ocir_endpoint }}
OCIR_REPOSITORY: ${{ steps.get-ocir-repository-tracker.outputs.repo_path }}
run: |
docker build \
-f clotributor-tracker/Dockerfile \
-t $ECR_REGISTRY/clotributor-tracker:$GITHUB_SHA \
-t $OCIR_REPOSITORY:$GITHUB_SHA \
.
docker push $ECR_REGISTRY/clotributor-tracker:$GITHUB_SHA
docker push $OCIR_REPOSITORY:$GITHUB_SHA