Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upstream sync workflow #229

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/pull_from_upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Sync OpenAstronomy Workflows from upstream

on:
workflow_dispatch:
schedule:
# Run every Saturday at 0900 UTC
- cron: '0 9 * * 6'

jobs:
sync-workflows:
if: github.repository != 'OpenAstronomy/github-actions-workflows'
runs-on: ubuntu-latest

steps:
- name: Checkout target repository
uses: actions/checkout@v3
with:
# Checkout the repository where the workflow is running
ref: main
fetch-depth: 0

- name: Set up git
run: |
git config --global user.name "${{ secrets.GITHUB_ACTOR }}"
git config --global user.email "${{ secrets.GITHUB_ACTOR }}@users.noreply.github.com"

- name: Pull from OpenAstronomy/github-actions-workflows main branch
run: |
git remote add upstream https://github.com/OpenAstronomy/github-actions-workflows.git
git fetch upstream main
git merge upstream/main

- name: Push changes to the target repository
run: |
git push origin main