diff --git a/.github/workflows/copy-workflow.yml b/.github/workflows/copy-workflow.yml index 235beed0..8b538c16 100644 --- a/.github/workflows/copy-workflow.yml +++ b/.github/workflows/copy-workflow.yml @@ -39,6 +39,7 @@ jobs: uses: actions/checkout@v2 with: path: ${{ env.TEMPLATE_REPO_DIR }} + ref: ${{ matrix.cfg.source_ref || github.ref }} - name: determine GitHub default branch working-directory: ${{ env.TARGET_REPO_DIR }} run: | diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 0c2d579b..a0d82bfa 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -7,6 +7,7 @@ name: Dispatch on: push: branches: [ master, testing ] + workflow_dispatch: env: # Number of repositories in a batch. @@ -23,6 +24,7 @@ env: jobs: matrix: + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing' name: Batch targets runs-on: ubuntu-latest outputs: diff --git a/README.md b/README.md index 37b82d46..22198a06 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,24 @@ This check will be run in repositories that set `gogenerate` to `true` in `.gith Note that depending on the code generators used, it might be necessary to [install those first](#additional-setup-steps). The generators must also be deterministic, to prevent CI from getting different results each time. +## Technical Preview + +You can opt-in to receive early updates from the `next` branch in-between official Unified CI releases. + +To do so you have to set `source_ref` property to `next` on your repository target object in the configuration file. +```json +{ + "repositories": [ + { + "target": "pl-strflt/example", + "source_ref": "next" + } + ] +} +``` + +_Warning_: `next` branch updates are much more frequent than those from `master`. + ## Technical Details This repository currently defines two workflows for Go repositories: