diff --git a/.github/subtrees.json b/.github/subtrees.json index 2e7193a9..fed22388 100644 --- a/.github/subtrees.json +++ b/.github/subtrees.json @@ -1,37 +1,30 @@ [ { "prefix": "src", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/iphreeqc-src.git", "repo": "usgs-coupled-subtrees/iphreeqc-src" }, { "prefix": "examples/c", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc-commanuscript-cgfinal-examples-c.git", "repo": "usgs-coupled-subtrees/phreeqc-commanuscript-cgfinal-examples-c" }, { "prefix": "examples/com", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc-commanuscript-cgfinal-examples-com.git", "repo": "usgs-coupled-subtrees/phreeqc-commanuscript-cgfinal-examples-com" }, { "prefix": "examples/fortran", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc-COMManuscript-CGfinal-examples-fortran.git", "repo": "usgs-coupled-subtrees/phreeqc-COMManuscript-CGfinal-examples-fortran" }, { "prefix": "database", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-database.git", "repo": "usgs-coupled-subtrees/phreeqc3-database" }, { "prefix": "phreeqc3-doc", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-doc.git", "repo": "usgs-coupled-subtrees/phreeqc3-doc" }, { "prefix": "phreeqc3-examples", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-examples.git", "repo": "usgs-coupled-subtrees/phreeqc3-examples" } ] \ No newline at end of file diff --git a/.github/workflows/lint-subtrees.yml b/.github/workflows/lint-subtrees.yml index 60661485..71d8e58f 100644 --- a/.github/workflows/lint-subtrees.yml +++ b/.github/workflows/lint-subtrees.yml @@ -14,6 +14,6 @@ jobs: CI_SERVER_HOST: github.com GROUP: usgs-coupled steps: - - uses: usgs-coupled/sync-subtrees-action/lint-subtrees/@main + - uses: usgs-coupled-subtrees/sync-subtrees-action/lint-subtrees/@main with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.github/workflows/subtree.yml b/.github/workflows/subtree.yml index 6dda6cf6..b4527205 100644 --- a/.github/workflows/subtree.yml +++ b/.github/workflows/subtree.yml @@ -1,12 +1,15 @@ 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: true + default: false type: boolean testMerge: description: 'Run in test mode, pushing to a test branch.' @@ -16,6 +19,7 @@ on: jobs: sync-subtrees: + if: startsWith(github.repository, 'usgs-coupled-subtrees/') runs-on: ubuntu-latest env: CI_SERVER_HOST: github.com @@ -23,7 +27,7 @@ jobs: GH_TOKEN: ${{ secrets.WORKFLOW_PAT }} steps: - name: Run sync-subtrees-action - uses: usgs-coupled/sync-subtrees-action@main + uses: usgs-coupled-subtrees/sync-subtrees-action@main with: dryRun: ${{ inputs.dryRun }} testMerge: ${{ inputs.testMerge }} diff --git a/database/.github/subtrees.json b/database/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/database/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/database/.github/superprojects.json b/database/.github/superprojects.json new file mode 100644 index 00000000..c1048e5a --- /dev/null +++ b/database/.github/superprojects.json @@ -0,0 +1,11 @@ +{ + "usgs-coupled-subtrees/phreeqc3-database": { + "superprojects": [ + "usgs-coupled-subtrees/iphreeqc", + "usgs-coupled-subtrees/iphreeqccom", + "usgs-coupled-subtrees/phreeqcrm", + "usgs-coupled-subtrees/phreeqc3", + "usgs-coupled-subtrees/wphast" + ] + } +} diff --git a/database/.github/workflows/lint-subtrees.yml b/database/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..71d8e58f --- /dev/null +++ b/database/.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/database/.github/workflows/lint-superprojects.yml b/database/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..c157704f --- /dev/null +++ b/database/.github/workflows/lint-superprojects.yml @@ -0,0 +1,20 @@ +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 }} + # skip-repos: | + # - usgs-coupled-subtrees/iphreeqccom + # - usgs-coupled-subtrees/phreeqcrm-src + diff --git a/database/.github/workflows/subtree.yml b/database/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/database/.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 }} diff --git a/examples/c/.github/superprojects.json b/examples/c/.github/superprojects.json new file mode 100644 index 00000000..c04bbc0d --- /dev/null +++ b/examples/c/.github/superprojects.json @@ -0,0 +1,9 @@ +{ + "usgs-coupled-subtrees/phreeqc-commanuscript-cgfinal-examples-c": { + "superprojects": [ + "usgs-coupled-subtrees/iphreeqc", + "usgs-coupled-subtrees/iphreeqccom", + "usgs-coupled-subtrees/phreeqc" + ] + } +} diff --git a/examples/c/.github/workflows/lint-subtrees.yml b/examples/c/.github/workflows/lint-subtrees.yml index 60661485..71d8e58f 100644 --- a/examples/c/.github/workflows/lint-subtrees.yml +++ b/examples/c/.github/workflows/lint-subtrees.yml @@ -14,6 +14,6 @@ jobs: CI_SERVER_HOST: github.com GROUP: usgs-coupled steps: - - uses: usgs-coupled/sync-subtrees-action/lint-subtrees/@main + - uses: usgs-coupled-subtrees/sync-subtrees-action/lint-subtrees/@main with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/examples/c/.github/workflows/lint-superprojects.yml b/examples/c/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..b46ff4bc --- /dev/null +++ b/examples/c/.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/examples/c/.github/workflows/subtree.yml b/examples/c/.github/workflows/subtree.yml index 6dda6cf6..b4527205 100644 --- a/examples/c/.github/workflows/subtree.yml +++ b/examples/c/.github/workflows/subtree.yml @@ -1,12 +1,15 @@ 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: true + default: false type: boolean testMerge: description: 'Run in test mode, pushing to a test branch.' @@ -16,6 +19,7 @@ on: jobs: sync-subtrees: + if: startsWith(github.repository, 'usgs-coupled-subtrees/') runs-on: ubuntu-latest env: CI_SERVER_HOST: github.com @@ -23,7 +27,7 @@ jobs: GH_TOKEN: ${{ secrets.WORKFLOW_PAT }} steps: - name: Run sync-subtrees-action - uses: usgs-coupled/sync-subtrees-action@main + uses: usgs-coupled-subtrees/sync-subtrees-action@main with: dryRun: ${{ inputs.dryRun }} testMerge: ${{ inputs.testMerge }} diff --git a/examples/com/.github/subtrees.json b/examples/com/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/examples/com/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/examples/com/.github/superprojects.json b/examples/com/.github/superprojects.json new file mode 100644 index 00000000..b865fe72 --- /dev/null +++ b/examples/com/.github/superprojects.json @@ -0,0 +1,9 @@ +{ + "usgs-coupled-subtrees/phreeqc-commanuscript-cgfinal-examples-com": { + "superprojects": [ + "usgs-coupled-subtrees/iphreeqc", + "usgs-coupled-subtrees/iphreeqccom", + "usgs-coupled-subtrees/phreeqc" + ] + } +} diff --git a/examples/com/.github/workflows/lint-subtrees.yml b/examples/com/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..71d8e58f --- /dev/null +++ b/examples/com/.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/examples/com/.github/workflows/lint-superprojects.yml b/examples/com/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..b46ff4bc --- /dev/null +++ b/examples/com/.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/examples/com/.github/workflows/subtree.yml b/examples/com/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/examples/com/.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 }} diff --git a/examples/fortran/.github/subtrees.json b/examples/fortran/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/examples/fortran/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/examples/fortran/.github/superprojects.json b/examples/fortran/.github/superprojects.json new file mode 100644 index 00000000..951d3f2d --- /dev/null +++ b/examples/fortran/.github/superprojects.json @@ -0,0 +1,9 @@ +{ + "usgs-coupled-subtrees/phreeqc-COMManuscript-CGfinal-examples-fortran": { + "superprojects": [ + "usgs-coupled-subtrees/iphreeqc", + "usgs-coupled-subtrees/iphreeqccom", + "usgs-coupled-subtrees/phreeqc" + ] + } +} diff --git a/examples/fortran/.github/workflows/lint-subtrees.yml b/examples/fortran/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..71d8e58f --- /dev/null +++ b/examples/fortran/.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/examples/fortran/.github/workflows/lint-superprojects.yml b/examples/fortran/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..b46ff4bc --- /dev/null +++ b/examples/fortran/.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/examples/fortran/.github/workflows/subtree.yml b/examples/fortran/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/examples/fortran/.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 }} diff --git a/phreeqc3-doc/.github/subtrees.json b/phreeqc3-doc/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/phreeqc3-doc/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/phreeqc3-doc/.github/superprojects.json b/phreeqc3-doc/.github/superprojects.json new file mode 100644 index 00000000..837f958a --- /dev/null +++ b/phreeqc3-doc/.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/phreeqc3-doc/.github/workflows/lint-subtrees.yml b/phreeqc3-doc/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..71d8e58f --- /dev/null +++ b/phreeqc3-doc/.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/phreeqc3-doc/.github/workflows/lint-superprojects.yml b/phreeqc3-doc/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..b46ff4bc --- /dev/null +++ b/phreeqc3-doc/.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/phreeqc3-doc/.github/workflows/subtree.yml b/phreeqc3-doc/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/phreeqc3-doc/.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 }} diff --git a/phreeqc3-examples/.github/subtrees.json b/phreeqc3-examples/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/phreeqc3-examples/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/phreeqc3-examples/.github/workflows/lint-subtrees.yml b/phreeqc3-examples/.github/workflows/lint-subtrees.yml new file mode 100644 index 00000000..71d8e58f --- /dev/null +++ b/phreeqc3-examples/.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/phreeqc3-examples/.github/workflows/subtree.yml b/phreeqc3-examples/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/phreeqc3-examples/.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 }} diff --git a/src/.github/subtrees.json b/src/.github/subtrees.json index 352be8c8..6d6f9b6e 100644 --- a/src/.github/subtrees.json +++ b/src/.github/subtrees.json @@ -1,7 +1,6 @@ [ { "prefix": "phreeqcpp", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-src.git", "repo": "usgs-coupled-subtrees/phreeqc3-src" } -] \ No newline at end of file +] diff --git a/src/.github/superprojects.json b/src/.github/superprojects.json index 3dec8709..bbc77cf2 100644 --- a/src/.github/superprojects.json +++ b/src/.github/superprojects.json @@ -1,8 +1,8 @@ { - "iphreeqc-src": { + "usgs-coupled-subtrees/iphreeqc-src": { "superprojects": [ - "usgs-coupled/iphreeqc", - "usgs-coupled/iphreeqccom", + "usgs-coupled-subtrees/iphreeqc", + "usgs-coupled-subtrees/iphreeqccom", "usgs-coupled-subtrees/phreeqcrm-src" ] } diff --git a/src/.github/workflows/lint-subtrees.yml b/src/.github/workflows/lint-subtrees.yml index 4306e374..7af56b67 100644 --- a/src/.github/workflows/lint-subtrees.yml +++ b/src/.github/workflows/lint-subtrees.yml @@ -17,6 +17,6 @@ jobs: CI_SERVER_HOST: github.com GROUP: usgs-coupled steps: - - uses: usgs-coupled/sync-subtrees-action/lint-subtrees/@main + - uses: usgs-coupled-subtrees/sync-subtrees-action/lint-subtrees/@main with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/src/.github/workflows/lint-superprojects.yml b/src/.github/workflows/lint-superprojects.yml index 3ab6debe..b46ff4bc 100644 --- a/src/.github/workflows/lint-superprojects.yml +++ b/src/.github/workflows/lint-superprojects.yml @@ -11,6 +11,6 @@ jobs: lint-superprojects: runs-on: ubuntu-latest steps: - - uses: usgs-coupled/sync-subtrees-action/lint-superprojects/@main + - uses: usgs-coupled-subtrees/sync-subtrees-action/lint-superprojects/@main with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/src/.github/workflows/subtree.yml b/src/.github/workflows/subtree.yml index 1f62d41d..b4527205 100644 --- a/src/.github/workflows/subtree.yml +++ b/src/.github/workflows/subtree.yml @@ -1,12 +1,15 @@ 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: true + default: false type: boolean testMerge: description: 'Run in test mode, pushing to a test branch.' @@ -16,13 +19,15 @@ on: jobs: sync-subtrees: + if: startsWith(github.repository, 'usgs-coupled-subtrees/') runs-on: ubuntu-latest env: CI_SERVER_HOST: github.com - GROUP: usgs-coupled + GROUP: usgs-coupled + GH_TOKEN: ${{ secrets.WORKFLOW_PAT }} steps: - name: Run sync-subtrees-action - uses: usgs-coupled/sync-subtrees-action@main + uses: usgs-coupled-subtrees/sync-subtrees-action@main with: dryRun: ${{ inputs.dryRun }} testMerge: ${{ inputs.testMerge }} diff --git a/src/phreeqcpp/.github/subtrees.json b/src/phreeqcpp/.github/subtrees.json index ff31b0dd..0791105f 100644 --- a/src/phreeqcpp/.github/subtrees.json +++ b/src/phreeqcpp/.github/subtrees.json @@ -1,7 +1,6 @@ [ { "prefix": "common", - "url": "git@${CI_SERVER_HOST}:${GROUP}-subtrees/phreeqc3-src-common.git", "repo": "usgs-coupled-subtrees/phreeqc3-src-common" } -] \ No newline at end of file +] diff --git a/src/phreeqcpp/.github/superprojects.json b/src/phreeqcpp/.github/superprojects.json new file mode 100644 index 00000000..97e0591c --- /dev/null +++ b/src/phreeqcpp/.github/superprojects.json @@ -0,0 +1,8 @@ +{ + "usgs-coupled-subtrees/phreeqc3-src": { + "superprojects": [ + "usgs-coupled-subtrees/iphreeqc-src", + "usgs-coupled-subtrees/phreeqc3" + ] + } +} diff --git a/src/phreeqcpp/.github/workflows/lint-subtrees.yml b/src/phreeqcpp/.github/workflows/lint-subtrees.yml index 4306e374..7af56b67 100644 --- a/src/phreeqcpp/.github/workflows/lint-subtrees.yml +++ b/src/phreeqcpp/.github/workflows/lint-subtrees.yml @@ -17,6 +17,6 @@ jobs: CI_SERVER_HOST: github.com GROUP: usgs-coupled steps: - - uses: usgs-coupled/sync-subtrees-action/lint-subtrees/@main + - uses: usgs-coupled-subtrees/sync-subtrees-action/lint-subtrees/@main with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/src/phreeqcpp/.github/workflows/subtree.yml b/src/phreeqcpp/.github/workflows/subtree.yml index 1f62d41d..b4527205 100644 --- a/src/phreeqcpp/.github/workflows/subtree.yml +++ b/src/phreeqcpp/.github/workflows/subtree.yml @@ -1,12 +1,15 @@ 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: true + default: false type: boolean testMerge: description: 'Run in test mode, pushing to a test branch.' @@ -16,13 +19,15 @@ on: jobs: sync-subtrees: + if: startsWith(github.repository, 'usgs-coupled-subtrees/') runs-on: ubuntu-latest env: CI_SERVER_HOST: github.com - GROUP: usgs-coupled + GROUP: usgs-coupled + GH_TOKEN: ${{ secrets.WORKFLOW_PAT }} steps: - name: Run sync-subtrees-action - uses: usgs-coupled/sync-subtrees-action@main + uses: usgs-coupled-subtrees/sync-subtrees-action@main with: dryRun: ${{ inputs.dryRun }} testMerge: ${{ inputs.testMerge }} diff --git a/src/phreeqcpp/common/.github/subtrees.json b/src/phreeqcpp/common/.github/subtrees.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/src/phreeqcpp/common/.github/subtrees.json @@ -0,0 +1 @@ +[] diff --git a/src/phreeqcpp/common/.github/superprojects.json b/src/phreeqcpp/common/.github/superprojects.json new file mode 100644 index 00000000..0bf12112 --- /dev/null +++ b/src/phreeqcpp/common/.github/superprojects.json @@ -0,0 +1,8 @@ +{ + "usgs-coupled-subtrees/phreeqc3-src-common": { + "superprojects": [ + "usgs-coupled-subtrees/phreeqc3-src", + "usgs-coupled-subtrees/wphast" + ] + } +} diff --git a/src/phreeqcpp/common/.github/workflows/lint-superprojects.yml b/src/phreeqcpp/common/.github/workflows/lint-superprojects.yml new file mode 100644 index 00000000..b46ff4bc --- /dev/null +++ b/src/phreeqcpp/common/.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/src/phreeqcpp/common/.github/workflows/subtree.yml b/src/phreeqcpp/common/.github/workflows/subtree.yml new file mode 100644 index 00000000..b4527205 --- /dev/null +++ b/src/phreeqcpp/common/.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 }}