Skip to content

Interoperate with ozone and add deployment files (#24) #1

Interoperate with ozone and add deployment files (#24)

Interoperate with ozone and add deployment files (#24) #1

Workflow file for this run

name: Deploy to Production
on:
push:
branches: [main]
env:
IMAGE_NAME: safe-skies-api
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DO_REGISTRY_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DO_REGISTRY_URL }}
tags: |
type=sha,prefix={{branch}}-
type=raw,value=latest
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200
- name: Build and push image to DigitalOcean Container Registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max