Add workflows for linting and syncing subtrees, and update subtrees.json format

This commit is contained in:
Charlton, Scott R. 2025-07-06 13:08:57 -06:00
parent 7ac0cb0f25
commit 22eab2be4d
4 changed files with 55 additions and 1 deletions

1
examples/c/.github/subtrees.json vendored Normal file
View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1,19 @@
name: Lint subtrees.json
on:
pull_request:
paths:
- '.github/subtrees.json'
workflow_call:
workflow_dispatch:
jobs:
lint-subtrees:
runs-on: ubuntu-latest
env:
CI_SERVER_HOST: github.com
GROUP: usgs-coupled
steps:
- uses: usgs-coupled/sync-subtrees-action/lint-subtrees/@main
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -0,0 +1,33 @@
name: Sync Subtrees
on:
workflow_dispatch:
inputs:
dryRun:
description: 'If true, dont push any changes (for testing only).'
required: true
default: true
type: boolean
testMerge:
description: 'Run in test mode, pushing to a test branch.'
required: true
default: false
type: boolean
jobs:
sync-subtrees:
runs-on: ubuntu-latest
env:
CI_SERVER_HOST: github.com
GROUP: usgs-coupled
GH_TOKEN: ${{ secrets.WORKFLOW_PAT }}
steps:
- name: Run sync-subtrees-action
uses: usgs-coupled/sync-subtrees-action@main
with:
dryRun: ${{ inputs.dryRun }}
testMerge: ${{ inputs.testMerge }}
repository_name: ${{ github.event.repository.name }}
default_branch: ${{ github.event.repository.default_branch }}
run_number: ${{ github.run_number }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -1,6 +1,7 @@
[
{
"prefix": "common",
"url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-src-common.git"
"url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-src-common.git",
"repo": "usgs-coupled-subtrees/phreeqc3-src-common"
}
]