Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds a nightly build action and build nightly rc from main #3961

Merged
merged 1 commit into from Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/actions/nightly-release/action.yaml
@@ -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 }}
17 changes: 17 additions & 0 deletions .github/workflows/rc_nightly.yaml
@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated as discussed, will merge on green.