mirror of
https://github.com/coredns/coredns.io.git
synced 2024-04-21 12:32:00 +00:00
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Sync CoreDNS Content
|
|
on:
|
|
schedule:
|
|
- cron: '4/12 * * * *'
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Checkout CoreDNS
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: coredns/coredns
|
|
path: .coredns
|
|
-
|
|
name: Cleanup
|
|
run: |
|
|
rm -rf public/*
|
|
-
|
|
name: Sync
|
|
run: |
|
|
make sync
|
|
-
|
|
name: Set up Git
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git config user.name "coredns-auto-sync[bot]"
|
|
git config user.email "coredns-auto-sync[bot]@users.noreply.github.com"
|
|
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
|
-
|
|
name: Push
|
|
run: |
|
|
git add .
|
|
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
|
git commit -m 'auto content sync'
|
|
git push
|
|
fi
|