fix dirname #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update KNOWN_GOOD_BLOCK_NUMBERS | |
on: | |
push: | |
branches: [ add-env ] | |
env: | |
DB_PATH: ./db.sqlite | |
permissions: | |
contents: write # required for push commit | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: Setup yarn | |
run: npm install -g yarn | |
- name: setup node env | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: 'yarn' | |
- run: yarn --immutable | |
- run: yarn update-env | |
- run: yarn test -u | |
- name: Commit and Create PR | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const branchName = `update-KNOWN_GOOD_BLOCK_NUMBERS-${context.sha.slice(0, 7)}` | |
await exec.exec(`git checkout -b ${branchName}`) | |
await exec.exec(`git`, ['commit', '-am', 'update KNOWN_GOOD_BLOCK_NUMBERS']) | |
await exec.exec(`git push origin HEAD:${branchName}`) | |
await github.rest.pulls.create({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
title: 'Update KNOWN_GOOD_BLOCK_NUMBERS', | |
head: branchName, | |
base: 'add-env', | |
body: 'Update KNOWN_GOOD_BLOCK_NUMBERS', | |
}) |