diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 73f8fd34f..c312d6b09 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,20 +1,24 @@ name: Spring Cloud Netflix CI Job + on: push: branches: - - 5.0.x + - main - 4.3.x + # Scheduled builds run daily at midnight UTC schedule: - cron: '0 0 * * *' + # Manual trigger with optional branch override workflow_dispatch: inputs: branches: description: "Which branch should be built (can be a comma-separated list of branches)" required: true - default: '5.0.x' + default: 'main' type: string + jobs: deploy: uses: spring-cloud/spring-cloud-github-actions/.github/workflows/deploy.yml@b6a6b1963b8762420526591c3d363bd7d09e7d4b # v1.1.1 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 336cef423..bab586412 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -5,6 +5,7 @@ # there and re-run the rollout, otherwise your change will be overwritten. name: Deploy Docs + on: push: # Allow-list of exactly this branch. A topic or Dependabot branch cut from @@ -12,14 +13,16 @@ on: # those would dispatch a full docs build for a ref that is not in the # Antora playbook. branches: - - 5.0.x + - main tags: '**' repository_dispatch: types: request-build-reference # legacy workflow_dispatch: + permissions: - contents: read # required to check out private commercial repositories - actions: write # required to dispatch the docs build + contents: read # required to check out private commercial repositories + actions: write # required to dispatch the docs build + jobs: build: runs-on: ubuntu-latest @@ -29,6 +32,7 @@ jobs: with: ref: docs-build fetch-depth: 1 + # A branch push rebuilds just that branch's docs; a tag push rebuilds # everything so the new version appears in the version dropdown. - name: Dispatch (partial build) @@ -36,6 +40,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }} + - name: Dispatch (full build) if: github.ref_type == 'tag' env: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 469da98bc..71f11885c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,7 +1,9 @@ name: PR + on: pull_request: - branches: [5.0.x, 4.3.x] + branches: [ main, 4.3.x ] + jobs: build: uses: spring-cloud/spring-cloud-github-actions/.github/workflows/pr.yml@b6a6b1963b8762420526591c3d363bd7d09e7d4b # v1.1.1