Skip to content

Load certs in API dockerfile (#6) #4

Load certs in API dockerfile (#6)

Load certs in API dockerfile (#6) #4

Workflow file for this run

name: Deploy CFDB to ECR
on:
push:
branches:
- master
jobs:
build:
if: github.repository == 'abdenlab/cfdb'
# Available versions:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
aws-region: us-east-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Push to ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: cfdb
IMAGE_TAG: latest
run: |
docker build --file Dockerfile.api -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG