From 90fc71bc0641723850f13b4ea5fc7dc5b25cf563 Mon Sep 17 00:00:00 2001 From: Neil Twigg Date: Tue, 28 Jan 2025 17:57:50 +0000 Subject: [PATCH] Fix Go version in Docker build Signed-off-by: Neil Twigg --- .github/actions/nightly-release/action.yaml | 7 ++----- .github/workflows/nightly.yaml | 9 +++++++-- docker/Dockerfile.nightly | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/actions/nightly-release/action.yaml b/.github/actions/nightly-release/action.yaml index 48cdff56e18..d54cc0161b9 100644 --- a/.github/actions/nightly-release/action.yaml +++ b/.github/actions/nightly-release/action.yaml @@ -8,7 +8,8 @@ inputs: label: description: The label to use for built images - required: true + required: false + default: nightly hub_username: description: Docker hub username @@ -51,9 +52,5 @@ runs: shell: bash run: | NDATE=$(date +%Y%m%d) - - docker tag synadia/nats-server:nightly-${NDATE} synadia/nats-server:${{ inputs.label }}-${NDATE} - docker tag synadia/nats-server:nightly-${NDATE} synadia/nats-server:${{ inputs.label }} - docker push synadia/nats-server:${{ inputs.label }}-${NDATE} docker push synadia/nats-server:${{ inputs.label }} diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 24f32493225..faac2f88da2 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -6,6 +6,11 @@ on: description: "Override image branch (optional)" type: string required: false + label: + description: "Override tag label (optional)" + type: string + required: false + default: "nightly" schedule: - cron: "40 4 * * *" @@ -22,8 +27,8 @@ jobs: - uses: ./src/github.com/nats-io/nats-server/.github/actions/nightly-release with: - go: "1.21" + go: "stable" workdir: src/github.com/nats-io/nats-server - label: nightly + label: ${{ inputs.label }} hub_username: "${{ secrets.DOCKER_USERNAME }}" hub_password: "${{ secrets.DOCKER_PASSWORD }}" diff --git a/docker/Dockerfile.nightly b/docker/Dockerfile.nightly index dbb2c093270..3c9d22f4b50 100644 --- a/docker/Dockerfile.nightly +++ b/docker/Dockerfile.nightly @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine AS builder +FROM golang:alpine AS builder ARG VERSION="nightly"