-
Notifications
You must be signed in to change notification settings - Fork 26
181 lines (172 loc) · 5.18 KB
/
Copy pathci.yaml
File metadata and controls
181 lines (172 loc) · 5.18 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: CI
on:
push:
branches:
- main
- master
tags:
- "*"
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
test-launcher:
name: Test npm launcher
runs-on: ubuntu-latest
steps:
- uses: ory/ci/checkout@master
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: npm run test:launcher
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: ory/ci/checkout@master
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.mod
- uses: actions/cache@v4
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('go.mod') }}
restore-keys: ${{ runner.os }}-playwright-
- run:
go run github.com/mxschmitt/playwright-go/cmd/playwright install
chromium --with-deps
- run: make lint
- run: go test -race ./...
env:
ORY_RATE_LIMIT_HEADER: ${{ secrets.ORY_RATE_LIMIT_HEADER }}
ORY_CONSOLE_URL: https://console.staging.ory.dev
ORY_ORYAPIS_URL: https://staging.oryapis.dev
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-traces
path: playwright-traces
docs:
name: Generate docs
runs-on: ubuntu-latest
steps:
- uses: ory/ci/docs/cli-next@master
with:
token: ${{ secrets.ORY_BOT_PAT }}
output-dir: docs/cli
release:
name: Generate release
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- test
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: ory/ci/releaser@master
with:
token: ${{ secrets.ORY_BOT_PAT }}
goreleaser_key: ${{ secrets.GORELEASER_KEY }}
cosign_pwd: ${{ secrets.COSIGN_PWD }}
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_PASSWORD }}
npm-publish:
name: Publish to npm
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- release
# Authenticates to npm via OIDC trusted publishing (no token). Each
# published package must list this repo and workflow file as a trusted
# publisher in its npmjs.com settings.
permissions:
id-token: write
contents: read
steps:
- uses: ory/ci/checkout@master
- uses: actions/setup-node@v4
with:
node-version: "22"
# Trusted publishing requires npm >= 11.5.1; node 22 bundles npm 10.
- run: npm install -g npm@11
- env:
REF_NAME: ${{ github.ref_name }}
run: node npm/publish.js "$REF_NAME"
newsletter-draft:
name: Draft newsletter
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- release
steps:
- uses: ory/ci/newsletter@master
with:
mailchimp_list_id: 058a056618
mailchmip_segment_id: 11398953
mailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}
draft: "true"
ssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}
slack-approval-notification:
name: Pending approval Slack notification
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- newsletter-draft
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- uses: slackapi/slack-github-action@v1.16.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Pending approval for newsletter send (*${{ github.repository }}*)"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "View workflow",
"emoji": true
},
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"action_id": "workflow_link"
}
}
]
}
newsletter-send:
name: Send newsletter
runs-on: ubuntu-latest
needs:
- newsletter-draft
if: ${{ github.ref_type == 'tag' }}
environment: production
steps:
- uses: ory/ci/newsletter@master
with:
mailchimp_list_id: 058a056618
mailchmip_segment_id: 11398953
mailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}
draft: "false"
ssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}