-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (99 loc) · 3.1 KB
/
build.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build
on:
push:
branches:
- master
jobs:
docker-hariko:
if: github.repository == 'misskey-dev/0key.dev'
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4.1.6
- uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
cd hariko
docker build -t "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-hariko" .
docker push "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-hariko"
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
docker-misskey:
if: github.repository == 'misskey-dev/0key.dev'
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4.1.6
- uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: Homebrew/actions/setup-homebrew@master
- run: |
cd misskey
(brew install jaq; cd misskey; jaq --in-place ".version += \"-${${"$(git -P log --color=never --pretty=format:%d.%H | head -n1)":10}/,*)/}\"" package.json)
docker build -t "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey" .
docker push "ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey"
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
helm-hariko:
if: github.repository == 'misskey-dev/0key.dev'
needs:
- docker-hariko
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4.1.6
- run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- uses: azure/setup-helm@v4.2.0
with:
version: v3.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mikefarah/yq@v4.44.1
with:
cmd: yq -i ".image.index = \"ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-hariko\"" hariko/chart/values.yaml
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
- uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: "hariko/chart"
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
helm-misskey:
if: github.repository == 'misskey-dev/0key.dev'
needs:
- docker-misskey
- helm-hariko
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4.1.6
- run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- uses: azure/setup-helm@v4.2.0
with:
version: v3.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: mikefarah/yq@v4.44.1
with:
cmd: yq -i ".image.index = \"ghcr.io/misskey-dev/0key.dev:$GITHUB_REF_NAME-misskey\"" misskey/chart/values.yaml
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
- uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: "misskey/chart"
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}