Skip to content

Commit 75a9223

Browse files
committed
WIP
1 parent 5213724 commit 75a9223

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

.github/workflows/app-build.yml

Whitespace-only changes.

README.md

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,84 @@ GitLab templates are stored in `.gitlab`. This repository must be selected as th
88

99
Note that template syntax differs by a little bit. In particular GitHub templates require a stanza at the beginning while GitLab templates use special slash commands. When updating the templates for GitHub or GitLab, ensure that it is also updated for the other system as well so we can have a consistent set of templates.
1010

11-
Ensure that this repository is mirrored from GitLab to GitHub.
11+
Ensure that this repository is mirrored from GitLab to GitHub.
12+
13+
## Workflows
14+
15+
This is where we centralized re-usable workflows for GitHub actions. Workflows
16+
are grouped together into different kinds of projects.
17+
18+
* library-js - TS/JS projects that produce libraries as NPM packages.
19+
- feature - for feature branches
20+
- staging - for staging branches
21+
- tag - for tag branches
22+
23+
To use them, for example in a library-js project. You create 3 caller workflows
24+
in `/.github/workflows`:
25+
26+
* `feature.yml`
27+
```yml
28+
name: "CI / Feature"
29+
30+
on:
31+
push:
32+
branches:
33+
- feature*
34+
workflow_dispatch:
35+
36+
concurrency:
37+
group: ${{ github.workflow }}-${{ github.ref }}
38+
cancel-in-progress: true
39+
40+
jobs:
41+
use-library-js-feature:
42+
permissions:
43+
packages: read
44+
contents: read
45+
actions: write
46+
checks: write
47+
uses: MatrixAI/.github/.github/workflows/library-js-feature.yml@master
48+
```
49+
* `staging.yml`
50+
```yml
51+
name: "CI / Staging"
52+
53+
on:
54+
push:
55+
branches:
56+
- staging
57+
workflow_dispatch:
58+
59+
concurrency:
60+
group: ${{ github.workflow }}-${{ github.ref }}
61+
cancel-in-progress: true
62+
63+
jobs:
64+
use-library-js-staging:
65+
permissions:
66+
packages: read
67+
contents: read
68+
actions: write
69+
checks: write
70+
pull-requests: write
71+
uses: MatrixAI/.github/.github/workflows/library-js-staging.yml@master
72+
73+
```
74+
* `tag.yml`
75+
```yml
76+
name: "CI / Tag"
77+
78+
on:
79+
push:
80+
tags:
81+
- 'v*.*.*'
82+
workflow_dispatch:
83+
84+
jobs:
85+
use-library-js-tag:
86+
permissions:
87+
packages: read
88+
contents: read
89+
actions: write
90+
uses: MatrixAI/.github/.github/workflows/library-js-tag.yml@master
91+
```

0 commit comments

Comments
 (0)