Skip to content

Commit 6aa7fa2

Browse files
committed
Add GitHub Actions workflow.
1 parent 8cdee88 commit 6aa7fa2

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and publish Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- trunk
7+
workflow_dispatch:
8+
9+
permissions:
10+
packages: write
11+
12+
jobs:
13+
push_to_registry:
14+
name: Push Docker image to GitHub Container registry
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v4
19+
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v3
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Log in to Container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and Push to Container registry
34+
uses: docker/build-push-action@v5
35+
with:
36+
context: .
37+
platforms: linux/amd64
38+
push: true
39+
tags: ghcr.io/rakino/misskey:latest
40+
cache-from: type=gha
41+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)