-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3961 from ripienaar/nightly_rc_docker
adds a nightly build action and build nightly rc from main
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Nightly Docker Releaser | ||
description: Builds nightly docker images | ||
|
||
inputs: | ||
go: | ||
description: The version of go to build with | ||
required: true | ||
|
||
branch: | ||
description: The branch to build | ||
required: true | ||
|
||
label: | ||
description: The label to use for built images | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: src/github.com/nats-io/nats-server | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "${{ inputs.go }}" | ||
|
||
- name: goreleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
env: | ||
LABEL: | ||
with: | ||
version: latest | ||
args: release --snapshot --config .goreleaser-nightly.yml | ||
|
||
- name: images | ||
shell: bash | ||
run: | | ||
docker images | ||
- name: docker_login | ||
run: | | ||
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" | ||
- name: docker_push | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: NATS Server Nightly RC | ||
on: | ||
workflow_dispatch: {} | ||
|
||
schedule: | ||
- cron: "40 4 * * *" | ||
|
||
|
||
jobs: | ||
rc_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ./.github/actions/nightly-release | ||
with: | ||
go: "1.19" | ||
branch: main | ||
label: nightly-main |