Skip to content

Merge pull request #13 from nulib/5401-iiif-cdk #5

Merge pull request #13 from nulib/5401-iiif-cdk

Merge pull request #13 from nulib/5401-iiif-cdk #5

Workflow file for this run

name: Deploy IIIF to Amazon ECR
on:
push:
branches:
- main
paths:
- '!iiif/**/*.md'
- 'iiif/**'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # 🔹 REQUIRED for OIDC authentication
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::625046682746:role/github-actions-role
aws-region: us-east-1
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build, tag, and push docker image to Amazon ECR Public
env:
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: nulib-staging
REPOSITORY: osdp-iiif-fetcher
IMAGE_TAG: latest
run: |
cd iiif
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG