Skip to content

Commit

Permalink
spec(ci): Setup Docker Image build via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Jan 25, 2024
1 parent 6c9b84a commit 7e08067
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docker-io.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish Docker image

on:
push:
branches:
- main

workflow_dispatch:

jobs:
push_to_registry:
name: Push Docker image to GitHub Container Registry
runs-on: ubuntu-22.04
if: github.repository == 'MisskeyIO/ai'
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/misskeyio/ai
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
add-hosts: |
ja.osdn.net:127.0.0.1
build-args: |
enable_mecab=1
push: true
platforms: ${{ steps.buildx.outputs.platforms }}
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 7e08067

Please sign in to comment.