Skip to content

Commit

Permalink
Set up a GitHub Action to keep in sync with Cygwin
Browse files Browse the repository at this point in the history
This will help us by automating an otherwise tedious task.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho authored and lazka committed Jan 19, 2023
1 parent 7f50d45 commit 370f770
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/sync-with-cygwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: sync-with-cygwin

# File: .github/workflows/repo-sync.yml

on:
workflow_dispatch:
schedule:
- cron: "42 * * * *"
jobs:
repo-sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Fetch Cygwin's latest master and tags
run: |
git init --bare
# Potentially use git://sourceware.org/git/newlib-cygwin.git directly, but GitHub seems more reliable
git fetch https://github.com/cygwin/cygwin master:refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'
- name: Push to our fork
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'

0 comments on commit 370f770

Please sign in to comment.