Files
starter-workflows/.github/workflows/sync_ghes.yaml
T
pastelmind d3f35ae32d Use actions/setup-node v2
Since actions/setup-node v2 has been declared stable since v2.1.4
(released on 2020-12-16), it should be safe to move everyone to v2.
2021-03-13 14:34:06 +09:00

33 lines
806 B
YAML

name: Sync workflows for GHES
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git config user.email "cschleiden@github.com"
git config user.name "GitHub Actions"
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Check starter workflows for GHES compat
run: |
npm ci
npx ts-node-script ./index.ts
working-directory: ./script/sync-ghes
- run: |
git add -A
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
else
git commit -m "Updating GHES workflows"
fi
- run: git push