-
Notifications
You must be signed in to change notification settings - Fork 0
186 lines (162 loc) · 4.66 KB
/
branch.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
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
182
183
184
185
186
name: Branch
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- "v*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
issues: write
discussions: write
packages: write
pages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
jobs:
# security:
# name: Security
# runs-on: namespace-profile-btp-portal
# if: github.ref_name != 'main'
# steps:
# - name: Checkout
# uses: namespacelabs/nscloud-checkout-action@v2
# with:
# fetch-depth: 0
# - name: Detect new vulnerabilities
# uses: AikidoSec/[email protected]
# continue-on-error: true
# with:
# secret-key: ${{ secrets.AIKIDO_SECRET_KEY }}
# fail-on-timeout: false
# fail-on-dependency-scan: true
# fail-on-sast-scan: true
# fail-on-iac-scan: false
# minimum-severity: 'CRITICAL'
# timeout-seconds: 180
# post-scan-status-comment: true
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: TruffleHog OSS
# uses: trufflesecurity/[email protected]
# with:
# extra_args: --only-verified
# test:
# name: Test
# runs-on: namespace-profile-btp-scs-portal
# services:
# db:
# image: postgres:16-alpine
# env:
# POSTGRES_USER: portal
# POSTGRES_PASSWORD: portal
# POSTGRES_DB: portal
# ports:
# - "5432:5432"
# redis:
# image: redis:7-alpine
# ports:
# - "6379:6379"
# foundry:
# image: ghcr.io/settlemint/btp-anvil-test-node:latest
# ports:
# - "8545:8545"
# steps:
# - name: Checkout
# uses: namespacelabs/nscloud-checkout-action@v3
# with:
# fetch-depth: 2
# - name: Setup caches
# uses: namespacelabs/nscloud-cache-action@v1
# with:
# path: |
# ./node_modules
# - name: Setup git user
# run: |
# git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
# git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
# - name: Install Bun
# uses: oven-sh/setup-bun@v1
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# - name: Install dependencies
# run: bun install
# - name: Codegen
# run: bun codegen
# - name: Test Setup
# run: bun test:setup
# - name: Deploy Smart Contract Sets
# run: bun test:deploy-scs
# - name: Test
# run: bun test --coverage
build:
name: Build
# needs: test
runs-on: namespace-profile-eas-indexing-service
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
CHAIN_ID: 11155111
steps:
- name: Checkout
uses: namespacelabs/nscloud-checkout-action@v3
with:
fetch-depth: 2
- name: Setup caches
uses: namespacelabs/nscloud-cache-action@v1
with:
path: |
./node_modules
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'yarn'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
yarn install
- name: Generate prisma scheme
run: |
SKIP_PRISMA_VERSION_CHECK=true npx prisma generate
- name: Docker meta
if: github.event_name != 'pull_request'
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/settlemint/eas-indexing-service
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
provenance: mode=max
sbom: true