Skip to content

Sync of all_metadata.json #93

Sync of all_metadata.json

Sync of all_metadata.json #93

Workflow file for this run

name: Sync of all_metadata.json
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
jobs:
nightly-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout destination repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout source repo
uses: actions/checkout@v4
with:
repository: 'AMES-DLAB/data_lake'
fetch-depth: 1
path: temp-source
sparse-checkout: |
all_metadata.json
sparse-checkout-cone-mode: false
- name: Copy metadata file
run: |
cp temp-source/all_metadata.json all_metadata.json
- name: Remove temp-source folder
run: rm -rf temp-source
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
branch: sync-all-metadata
title: "Nightly Sync: all_metadata.json"
body: "Automated pull request syncing metadata from source repo"
delete-branch: false
auto_merge:
needs: nightly-sync
runs-on: ubuntu-latest
if: needs.nightly-sync.outputs.pull-request-number != ''
steps:
- name: Enable Auto-Merge
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ needs.nightly-sync.outputs.pull-request-number }}
merge-method: merge