Skip to content

Commit de1fcbc

Browse files
committed
Set up a GitHub Action to keep in sync with Cygwin
This will help us by automating an otherwise tedious task. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 1653375 commit de1fcbc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: sync-with-cygwin
2+
3+
# File: .github/workflows/repo-sync.yml
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "42 * * * *"
9+
jobs:
10+
repo-sync:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Fetch Cygwin's latest master and tags
16+
run: |
17+
git init --bare
18+
# Potentially use git://sourceware.org/git/newlib-cygwin.git directly, but GitHub seems more reliable
19+
git fetch https://github.com/cygwin/cygwin master:refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'
20+
- name: Push to our fork
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
run: |
24+
git push https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'

0 commit comments

Comments
 (0)