forked from actions/starter-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 930 Bytes
/
sync-ghes.yaml
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
name: Sync workflows for GHES
on:
push:
branches: [ main ]
jobs:
sync:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git config user.email "[email protected]"
git config user.name "GitHub Actions"
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: script/sync-ghes/package-lock.json
- 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