diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 19dbd47523e..61433fe258a 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -1,11 +1,15 @@ name: "NATS Server Nightly: DEV" on: - workflow_dispatch: {} + workflow_dispatch: + inputs: + target: + description: "Override image branch (optional)" + type: string + required: false schedule: - cron: "40 4 * * *" - jobs: nightly_release: runs-on: ubuntu-latest @@ -14,7 +18,7 @@ jobs: uses: actions/checkout@v3 with: path: src/github.com/nats-io/nats-server - ref: dev + ref: ${{ inputs.target || 'dev' }} - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release with: @@ -22,4 +26,4 @@ jobs: workdir: src/github.com/nats-io/nats-server label: nightly hub_username: "${{ secrets.DOCKER_USERNAME }}" - hub_password: "${{ secrets.DOCKER_PASSWORD }}" \ No newline at end of file + hub_password: "${{ secrets.DOCKER_PASSWORD }}" diff --git a/.github/workflows/rc_nightly.yaml b/.github/workflows/rc_nightly.yaml index 9dc68f7dfa8..2228e226b24 100644 --- a/.github/workflows/rc_nightly.yaml +++ b/.github/workflows/rc_nightly.yaml @@ -1,11 +1,15 @@ name: "NATS Server Nightly: MAIN" on: - workflow_dispatch: {} + workflow_dispatch: + inputs: + target: + description: "Override image branch (optional)" + type: string + required: false schedule: - cron: "40 4 * * *" - jobs: nightly_main_release: runs-on: ubuntu-latest @@ -14,7 +18,7 @@ jobs: uses: actions/checkout@v3 with: path: src/github.com/nats-io/nats-server - ref: main + ref: ${{ inputs.target || 'main' }} - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release with: @@ -22,4 +26,4 @@ jobs: workdir: src/github.com/nats-io/nats-server label: nightly-main hub_username: "${{ secrets.DOCKER_USERNAME }}" - hub_password: "${{ secrets.DOCKER_PASSWORD }}" \ No newline at end of file + hub_password: "${{ secrets.DOCKER_PASSWORD }}"