forked from TalismanSociety/chaindata
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.45 KB
/
build-jobs.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
name: Chaindata Build (jobs)
on:
# call this workflow from another one (build.yaml)
workflow_call:
inputs:
environment:
type: string
jobs:
publish:
name: 'Build & publish chaindata to pub folder'
timeout-minutes: 15
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build chaindata
run: pnpm build
- name: Commit changes
env:
CHAINDATA_CI_SUPERUSER_ACCESS_TOKEN: ${{ secrets.CHAINDATA_CI_SUPERUSER_ACCESS_TOKEN }}
run: |
git config --local --unset-all 'http.https://github.com/.extraheader'
git remote set-url origin https://x-access-token:${CHAINDATA_CI_SUPERUSER_ACCESS_TOKEN}@github.com/TalismanSociety/chaindata
git config user.name "chaindata-ci-superuser[bot]"
git config user.email "146698419+chaindata-ci-superuser[bot]@users.noreply.github.com"
if [[ "$(git status --porcelain=v2)" != "" ]]; then
git add .
git commit -m 'chore: built chaindata'
git push
fi