Skip to content

Commit

Permalink
Alternate fork refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
stooit committed Oct 3, 2024
1 parent 0ffea1e commit 35716dc
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
name: Sync Fork

on:
schedule:
- cron: '*/30 * * * *' # every 30 minutes
workflow_dispatch: # on button click
- cron: '0 * * * *'

jobs:
sync:
workflow_dispatch: # click the button


jobs:
sync_with_upstream:
runs-on: ubuntu-latest
name: Sync main with upstream latest

steps:
- uses: tgymnich/[email protected]
with:
base: master
head: master
# Step 1: run a standard checkout action, provided by github
- name: Checkout main
uses: actions/checkout@v2
with:
ref: main

# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
- name: Pull (Fast-Forward) upstream changes
id: sync
uses: aormsby/[email protected]
with:
upstream_repository: ipverse/asn-info
upstream_branch: master
target_branch: master
git_pull_args: --ff-only

# Step 3: Display a message if 'sync' step had new commits (simple test)
- name: Check for new commits
if: steps.sync.outputs.has_new_commits
run: echo "There were new commits."

# Step 4: Print a helpful timestamp for your records (not required, just nice)
- name: Timestamp
run: date

0 comments on commit 35716dc

Please sign in to comment.