-
Notifications
You must be signed in to change notification settings - Fork 7
89 lines (86 loc) · 2.02 KB
/
backend-mage-pipeline.yaml
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
name: template-mage-pipeline
## workflow will trigger on below condition,
## except image release that have jobs condition to trigger only on tagging
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- 'v*.*.*'
env:
CARDINAL_REGISTRY_PATH: starter-game-template/cardinal
NAKAMA_REGISTRY_PATH: starter-game-templa/nakama
jobs:
mage-build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
go-version: [1.20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Mage - check
uses: magefile/mage-action@v2
with:
version: latest
args: check
- name: Mage - build
uses: magefile/mage-action@v2
with:
version: latest
args: build
mage-test:
runs-on: ubuntu-latest
needs: mage-build
defaults:
run:
shell: bash
strategy:
matrix:
go-version: [1.20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Mage - check
uses: magefile/mage-action@v2
with:
version: latest
args: check
- name: Mage - test
uses: magefile/mage-action@v2
with:
version: latest
args: test
images-release:
runs-on: ubuntu-latest
needs: mage-build
defaults:
run:
shell: bash
strategy:
matrix:
go-version: [1.20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- run: docker images