Skip to content

Sync

Sync #82

Workflow file for this run

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 }}