-
Notifications
You must be signed in to change notification settings - Fork 25
38 lines (31 loc) · 1.19 KB
/
pull_from_upstream.yml
File metadata and controls
38 lines (31 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Sync OpenAstronomy Workflows from upstream
on:
workflow_dispatch:
schedule:
# Run every Saturday at 0900 UTC
- cron: '0 9 * * 6'
permissions: {}
jobs:
sync-workflows:
if: github.repository != 'OpenAstronomy/github-actions-workflows'
runs-on: ubuntu-latest
steps:
- name: Checkout target repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# Checkout the repository where the workflow is running
ref: main
fetch-depth: 0
persist-credentials: false
- name: Set up git
run: |
git config --global user.name "${{ secrets.GITHUB_ACTOR }}" # zizmor: ignore[secrets-outside-env]
git config --global user.email "${{ secrets.GITHUB_ACTOR }}@users.noreply.github.com" # zizmor: ignore[secrets-outside-env]
- 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