Skip to content

Commit

Permalink
Added CI pipeline to build container and push to registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
pantierra committed Nov 15, 2024
1 parent a65f6a1 commit c2a1aeb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/deploy-eoapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build eoapi custom runtime

on:
workflow_dispatch:
push:
branches:
- main
- develop
paths:
- runtimes/eoapi/**
- .github/workflows/deploy-eoapi.yaml

jobs:
build:
name: build eoapi stac component
runs-on: "ubuntu-24.04"
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to container registry
uses: azure/docker-login@v1
with:
login-server: harbor.develop.eoepca.org
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: harbor.develop.eoepca.org/eoapi/stac
tags: |
type=ref,event=branch
type=sha,format=short
latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./runtimes/eoapi
file: ./dockerfiles/Dockerfile.stac
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.stac
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}

ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt

COPY runtimes/eoapi/stac /tmp/stac
COPY ./stac /tmp/stac
RUN python -m pip install /tmp/stac
RUN rm -rf /tmp/stac

Expand Down

0 comments on commit c2a1aeb

Please sign in to comment.