This repository was archived by the owner on Feb 23, 2026. It is now read-only.
forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (49 loc) · 1.69 KB
/
docker.yml
File metadata and controls
52 lines (49 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build And Push Container Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.repository == 'type4ny-project/type4ny'
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4.2.2
- 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/type4ny-project/type4ny
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
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
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
push: true
platforms: ${{ steps.buildx.outputs.platforms }}
provenance: false
labels: ${{ env.FORMATTED_BRANCH_NAME }}
cache-from: type=registry,ref=ghcr.io/type4ny-project/type4ny:buildcache
cache-to: type=registry,ref=ghcr.io/type4ny-project/type4ny:buildcache,mode=max
tags: |
ghcr.io/type4ny-project/type4ny:latest
ghcr.io/type4ny-project/type4ny:${{ env.FORMATTED_BRANCH_NAME }}
# https://github.com/MisskeyIO/misskey/blob/io/.github/workflows/docker-io.yml