From 513d19f200244cf3325f96441610462ebf258c69 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:53:38 +0000 Subject: [PATCH] Squashed 'src/' changes from 311bc42e..9592f209 9592f209 Add workflows for linting and syncing subtrees.json git-subtree-dir: src git-subtree-split: 9592f20922bb8dd17431c8975db68b17ab6598c1 --- phreeqcpp/.github/subtrees.json | 6 ++++ phreeqcpp/.github/workflows/lint-subtrees.yml | 22 +++++++++++++ phreeqcpp/.github/workflows/subtree.yml | 32 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 phreeqcpp/.github/subtrees.json create mode 100644 phreeqcpp/.github/workflows/lint-subtrees.yml create mode 100644 phreeqcpp/.github/workflows/subtree.yml diff --git a/phreeqcpp/.github/subtrees.json b/phreeqcpp/.github/subtrees.json new file mode 100644 index 00000000..7f076eb3 --- /dev/null +++ b/phreeqcpp/.github/subtrees.json @@ -0,0 +1,6 @@ +[ + { + "prefix": "common", + "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-src-common.git" + } +] \ No newline at end of file diff --git a/phreeqcpp/.github/workflows/lint-subtrees.yml b/phreeqcpp/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..4306e374 --- /dev/null +++ b/phreeqcpp/.github/workflows/lint-subtrees.yml @@ -0,0 +1,22 @@ +# This workflow lints the subtrees.json file to ensure it is valid and up-to-date. +# It is triggered on pull requests that modify the subtrees.json file or can be run manually +# via the GitHub Actions UI. +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 }} diff --git a/phreeqcpp/.github/workflows/subtree.yml b/phreeqcpp/.github/workflows/subtree.yml new file mode 100644 index 00000000..1f62d41d --- /dev/null +++ b/phreeqcpp/.github/workflows/subtree.yml @@ -0,0 +1,32 @@ +name: Sync Subtrees + +on: + workflow_dispatch: + inputs: + dryRun: + description: 'If true, don’t 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 + 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 }}