Skip to content

Sync Enum

Sync Enum #261

Workflow file for this run

name: Sync Enum
on:
workflow_dispatch: {}
schedule:
# https://crontab.guru/#0_9_*_*_1
# At 09:00 on Monday.
- cron: "0 9 * * 1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.ACTION_DEPLOY_KEY }}
# waiting on: https://github.com/actions/setup-node/issues/531
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- run: yarn install --immutable
- run: yarn sync
- name: git config
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
- name: git commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="chore/sync-$(date +%s)"
MESSAGE="feat: sync with latest Postgres Errors"
# UNCOMMENT FOR TESTING #
# echo "// test for ${BRANCH}" >> src/PostgresError.ts
git checkout -b ${BRANCH}
git add src/PostgresError.ts
if [[ `git status --porcelain` ]]; then
git commit --message "${MESSAGE}"
git push -u origin ${BRANCH}
gh pr create --title "${MESSAGE}" --body ""
fi