2023-04-09 09:29:06 +00:00
|
|
|
name: Publish Docker image (io)
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-12-29 07:22:13 +00:00
|
|
|
branches:
|
2024-03-18 21:39:57 +00:00
|
|
|
- io
|
2023-04-09 09:29:06 +00:00
|
|
|
tags:
|
2024-03-20 06:41:33 +00:00
|
|
|
- '[0-9.]+-io.*'
|
2023-04-09 09:29:06 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
push_to_registry:
|
|
|
|
name: Push Docker image to GitHub Container Registry
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
if: github.repository == 'MisskeyIO/misskey'
|
|
|
|
steps:
|
|
|
|
- name: Check out the repo
|
2023-09-27 21:05:39 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-09 09:29:06 +00:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-09-27 21:05:39 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-04-09 09:29:06 +00:00
|
|
|
with:
|
2023-04-09 09:38:55 +00:00
|
|
|
platforms: linux/amd64
|
2023-04-09 09:29:06 +00:00
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
2023-09-27 21:05:39 +00:00
|
|
|
uses: docker/metadata-action@v5
|
2023-04-09 09:29:06 +00:00
|
|
|
with:
|
|
|
|
images: ghcr.io/misskeyio/misskey
|
2023-04-09 09:35:53 +00:00
|
|
|
- name: Log in to GitHub Container Registry
|
2023-09-27 21:05:39 +00:00
|
|
|
uses: docker/login-action@v3
|
2023-04-09 09:29:06 +00:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Prepare image tags
|
|
|
|
run: |
|
|
|
|
echo "FORMATTED_BRANCH_NAME=$(echo ${{ github.ref_name }} | sed -e 's/\//-/g' )" >> $GITHUB_ENV
|
2023-04-09 09:35:53 +00:00
|
|
|
- name: Build and Push to GitHub Container Registry
|
2023-09-27 21:05:39 +00:00
|
|
|
uses: docker/build-push-action@v5
|
2023-04-09 09:29:06 +00:00
|
|
|
with:
|
|
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: ${{ steps.buildx.outputs.platforms }}
|
|
|
|
provenance: false
|
|
|
|
labels: ${{ env.FORMATTED_BRANCH_NAME }}
|
2023-11-06 14:39:33 +00:00
|
|
|
cache-from: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache
|
|
|
|
cache-to: type=registry,ref=ghcr.io/misskeyio/misskey:io-buildcache,mode=max
|
2023-04-09 09:29:06 +00:00
|
|
|
tags: |
|
|
|
|
ghcr.io/misskeyio/misskey:latest
|
|
|
|
ghcr.io/misskeyio/misskey:${{ env.FORMATTED_BRANCH_NAME }}
|