forked from wikimedia/mediawiki
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (82 loc) · 2.66 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
name: deploy
on:
push:
tags: ["v*.*.*-*"]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into registry Aliyun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.ALI_CR_USERNAME }}
password: ${{ secrets.ALI_CR_PASSWORD }}
- name: Extract mw Docker Metadata
id: mw_meta
uses: docker/metadata-action@v5
with:
images: |
registry.cn-shanghai.aliyuncs.com/prts/mw
ghcr.io/mooncellwiki/mw
tags: |
type=semver,pattern={{raw}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .github/workflows/mw.Dockerfile
push: true
tags: ${{ steps.mw_meta.outputs.tags }}
labels: ${{ steps.mw_meta.outputs.labels }}
- name: Extract nginx Docker Metadata
id: ng_meta
uses: docker/metadata-action@v5
with:
images: |
registry.cn-shanghai.aliyuncs.com/prts/ng
ghcr.io/mooncellwiki/ng
tags: |
type=semver,pattern={{raw}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .github/workflows/nginx.Dockerfile
push: true
tags: ${{ steps.ng_meta.outputs.tags }}
labels: ${{ steps.ng_meta.outputs.labels }}
build-args: VERSION=${{ github.ref_name }}
- name: Extract Caddy Docker Metadata
id: caddy_meta
uses: docker/metadata-action@v5
with:
images: |
registry.cn-shanghai.aliyuncs.com/prts/caddy
ghcr.io/mooncellwiki/caddy
tags: |
type=semver,pattern={{raw}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .github/workflows/caddy.Dockerfile
push: true
tags: ${{ steps.caddy_meta.outputs.tags }}
labels: ${{ steps.caddy_meta.outputs.labels }}
build-args: VERSION=${{ github.ref_name }}