From d51a46a28d5ab8e82d84b0d31e981a30cab9ed97 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 9 Jun 2026 10:24:23 -0400 Subject: [PATCH 1/3] feat: initialize syncweaver --- .syncweaver-lock.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .syncweaver-lock.json diff --git a/.syncweaver-lock.json b/.syncweaver-lock.json new file mode 100644 index 0000000..9177202 --- /dev/null +++ b/.syncweaver-lock.json @@ -0,0 +1,14 @@ +{ + "name": "NIDAP-Community/CodeOcean-MOSuite-create", + "homePage": "https://github.com/NIDAP-Community/CodeOcean-MOSuite-create", + "sources": { + "code/MOSuite": { + "repo_url": "https://github.com/CCBR/MOSuite", + "ref": "v0.3.1", + "git_sha": "c09ee39f9b282237f13d88dcf4cdfed965209c68", + "installed_by": [ + "syncweaver" + ] + } + } +} From 16b3ffa5472eccc593ce657016199e0275b522d9 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 9 Jun 2026 11:36:50 -0400 Subject: [PATCH 2/3] ci: test syncweaver update-source workflow --- .github/workflows/update-source.yml | 94 +++++++++++++++++++++++++++++ .syncweaver-lock.json | 2 +- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-source.yml diff --git a/.github/workflows/update-source.yml b/.github/workflows/update-source.yml new file mode 100644 index 0000000..b18a171 --- /dev/null +++ b/.github/workflows/update-source.yml @@ -0,0 +1,94 @@ +name: update-source + +on: + repository_dispatch: + workflow_dispatch: + inputs: + source_path: + description: Tracked source path in the host repository. + required: true + type: string + lockfile: + description: Path to the syncweaver lockfile. + required: false + default: .syncweaver-lock.json + type: string + ref: + description: Optional git ref to sync from. + required: false + type: string + remote_subdir: + description: Optional remote subdirectory to vendor. + required: false + type: string + +permissions: + contents: write + pull-requests: write + +jobs: + update-source: + runs-on: ubuntu-latest + outputs: + source_url: ${{ steps.update_source.outputs.source_url }} + ref: ${{ steps.update_source.outputs.ref }} + remote_subdir: ${{ steps.update_source.outputs.remote_subdir }} + env: + SOURCE_PATH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_path || github.event.client_payload.source_path || '' }} + LOCKFILE: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.lockfile || github.event.client_payload.lockfile || '.syncweaver-lock.json' }} + REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.event.client_payload.ref || '' }} + REMOTE_SUBDIR: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.remote_subdir || github.event.client_payload.remote_subdir || '' }} + steps: + - name: Generate CCBR-bot token + id: ccbr_bot + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.CCBR_BOT_APP_ID }} + private-key: ${{ secrets.CCBR_BOT_PRIVATE_KEY }} + + - name: Checkout repository + uses: actions/checkout@v6 + with: + token: ${{ steps.ccbr_bot.outputs.token }} + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.14" + cache: pip + + - name: Install syncweaver + run: | + python -m pip install --upgrade pip + python -m pip install "git+https://github.com/CCBR/syncweaver.git@main" + + - name: Run update-source composite action + id: update_source + uses: CCBR/syncweaver/actions/update-source@latest + with: + source_path: ${{ env.SOURCE_PATH }} + lockfile: ${{ env.LOCKFILE }} + ref: ${{ env.REF }} + remote_subdir: ${{ env.REMOTE_SUBDIR }} + + - name: Commit changes and open PR + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ steps.ccbr_bot.outputs.token }} + branch: syncweaver/update-source/${{ env.SOURCE_PATH }} + delete-branch: true + commit-message: "chore(syncweaver): update ${{ env.SOURCE_PATH}} from ${{ steps.update_source.outputs.source_repo }}@${{ steps.update_source.outputs.ref }}" + title: "chore(syncweaver): update ${{ env.SOURCE_PATH}} from ${{ steps.update_source.outputs.source_repo }}@${{ steps.update_source.outputs.ref }}" + body: | + Automated source update from the update-source workflow. + + Inputs used: + - source_path: ${{ env.SOURCE_PATH }} + - lockfile: ${{ env.LOCKFILE }} + - ref: ${{ env.REF }} + - remote_subdir: ${{ env.REMOTE_SUBDIR }} + + Resolved from lockfile after update: + - source_url: ${{ steps.update_source.outputs.source_url }} + - ref: ${{ steps.update_source.outputs.ref }} + - remote_subdir: ${{ steps.update_source.outputs.remote_subdir }} diff --git a/.syncweaver-lock.json b/.syncweaver-lock.json index 9177202..91a307f 100644 --- a/.syncweaver-lock.json +++ b/.syncweaver-lock.json @@ -4,7 +4,7 @@ "sources": { "code/MOSuite": { "repo_url": "https://github.com/CCBR/MOSuite", - "ref": "v0.3.1", + "ref": "main", "git_sha": "c09ee39f9b282237f13d88dcf4cdfed965209c68", "installed_by": [ "syncweaver" From 6e4a36e4045913b6667983b8815645078544889d Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 9 Jun 2026 11:57:18 -0400 Subject: [PATCH 3/3] chore: rename --- .../workflows/{update-source.yml => syncweaver-update-source.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{update-source.yml => syncweaver-update-source.yml} (100%) diff --git a/.github/workflows/update-source.yml b/.github/workflows/syncweaver-update-source.yml similarity index 100% rename from .github/workflows/update-source.yml rename to .github/workflows/syncweaver-update-source.yml