From 0a5c6fc279b5f7ba17de9303bf5bbf21c7c56f79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 22:48:18 +0000 Subject: [PATCH] Squashed 'phreeqc3-doc/' changes from 394240f2..05a4c62f 05a4c62f Add workflows and configuration for syncing and linting subtrees git-subtree-dir: phreeqc3-doc git-subtree-split: 05a4c62f48558d3d9c4b3dccf6ea4f2bb1f3b8e2 --- .github/subtrees.json | 1 + .github/superprojects.json | 10 +++++++ .github/workflows/lint-subtrees.yml | 19 ++++++++++++ .github/workflows/lint-superprojects.yml | 16 ++++++++++ .github/workflows/subtree.yml | 37 ++++++++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 .github/subtrees.json create mode 100644 .github/superprojects.json create mode 100644 .github/workflows/lint-subtrees.yml create mode 100644 .github/workflows/lint-superprojects.yml create mode 100644 .github/workflows/subtree.yml diff --git a/.github/subtrees.json b/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/.github/superprojects.json b/.github/superprojects.json new file mode 100644 index 00000000..837f958a --- /dev/null +++ b/.github/superprojects.json @@ -0,0 +1,10 @@ +{ + "usgs-coupled-subtrees/phreeqc3-doc": { + "superprojects": [ + "usgs-coupled-subtrees/iphreeqc", + "usgs-coupled-subtrees/iphreeqccom", + "usgs-coupled-subtrees/phast3-doc", + "usgs-coupled-subtrees/phreeqc3" + ] + } +} diff --git a/.github/workflows/lint-subtrees.yml b/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..71d8e58f --- /dev/null +++ b/.github/workflows/lint-subtrees.yml @@ -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-subtrees/sync-subtrees-action/lint-subtrees/@main + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.github/workflows/lint-superprojects.yml b/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..b46ff4bc --- /dev/null +++ b/.github/workflows/lint-superprojects.yml @@ -0,0 +1,16 @@ +name: Lint superprojects.json + +on: + pull_request: + paths: + - '.github/superprojects.json' + workflow_call: + workflow_dispatch: + +jobs: + lint-superprojects: + runs-on: ubuntu-latest + steps: + - uses: usgs-coupled-subtrees/sync-subtrees-action/lint-superprojects/@main + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.github/workflows/subtree.yml b/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/.github/workflows/subtree.yml @@ -0,0 +1,37 @@ +name: Sync Subtrees + +on: + push: + branches: + - master + workflow_dispatch: + inputs: + dryRun: + description: 'If true, don’t push any changes (for testing only).' + required: true + default: false + type: boolean + testMerge: + description: 'Run in test mode, pushing to a test branch.' + required: true + default: false + type: boolean + +jobs: + sync-subtrees: + if: startsWith(github.repository, 'usgs-coupled-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-subtrees/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 }}