waifuwave/.github/workflows/docker-build.yml
Xe Iaso 495456db5c
All checks were successful
Create and publish a Docker image to GitHub Container Registry / build-and-push-image (push) Successful in 7m2s
remove the download model step
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-01-14 14:34:42 -05:00

53 lines
1.4 KiB
YAML

name: Create and publish a Docker image to GitHub Container Registry
on:
push:
branches: ['main']
env:
REGISTRY: anu-registry.fly.dev
OWNER: xeserv
IMAGE_NAME: xeserv/waifuwave
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL_S3: https://fly.storage.tigris.dev
AWS_ENDPOINT_URL_IAM: https://fly.iam.storage.tigris.dev
AWS_REGION: auto
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.AWS_ACCESS_KEY_ID }}
password: ${{ env.AWS_SECRET_ACCESS_KEY }}
- id: install-aws-cli
uses: unfor19/install-aws-cli-action@v1
with:
arch: amd64
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: ${{ steps.meta.outputs.labels }}