-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 2.39 KB
/
sync.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
name: Sync
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/sync.yml
- workspace/sync/**/*
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
main:
runs-on: ubuntu-latest
environment: FRONTMATTER_BOT
strategy:
fail-fast: false
matrix:
repo:
- trustwallet/assets
- ethereum-optimism/ethereum-optimism.github.io
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'
- run: corepack enable pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm turbo run build
working-directory: workspace/sync
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# PLEASE be aware that this is a security risk when you allow untrusted repositories to be checked out.
# While `pnpm run sync` is executed such that we're only reading files which pose no security risk,
# it's nonetheless possible through other means to execute arbitrary code
# when you attempt to do "TOO MUCH" outside its intended use case.
path: workspace/sync/repo
repository: ${{ matrix.repo }}
ref: master
- run: pnpm run sync ${{ matrix.repo }}
working-directory: workspace/sync
# - id: app
# uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
# with:
# app_id: ${{ secrets.SYNC_APP_ID }}
# private_key: ${{ secrets.SYNC_PRIVATE_KEY }}
# permission is set to `write` for `pull-requests` and `contents`
- uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
with:
# token: ${{ steps.app.outputs.token }}
commit-message: 'chore(sync): ${{ matrix.repo }}'
title: 'chore(sync): ${{ matrix.repo }}'
body: |
#### What this PR does / why we need it:
Sync latest changes from `${{ matrix.repo }}` repository using `@workspace/sync`.
branch: sync/${{ matrix.repo }}