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

ci: release nightly images for version tags #2769

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ name: Nightly
on:
push:
branches: [unstable]
tags: ['v2.**']
pull_request:
paths: ['.github/workflows/nightly.yaml']

Expand Down Expand Up @@ -107,8 +108,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
- name: Docker meta (for unstable)
id: meta
if: ${{ github.ref_name == 'unstable' }}
uses: docker/metadata-action@v5
with:
images: apache/kvrocks
Expand All @@ -117,12 +119,28 @@ jobs:
type=sha,prefix=nightly-{{date 'YYYYMMDD'}}-,format=short
type=raw,value=nightly

- name: Docker meta (for tags)
id: meta_tag
if: ${{ github.ref_name != 'unstable' }}
uses: docker/metadata-action@v5
with:
images: apache/kvrocks
flavor: latest=false
tags: |
type=sha,prefix=nightly-{{date 'YYYYMMDD'}}-{{tag}}-,format=short

- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'apache/kvrocks@sha256:%s ' *)

- name: Inspect image
- name: Inspect image (for unstable)
if: ${{ github.ref_name == 'unstable' }}
run: |
docker buildx imagetools inspect apache/kvrocks:${{ steps.meta.outputs.version }}

- name: Inspect image (for tags)
if: ${{ github.ref_name != 'unstable' }}
run: |
docker buildx imagetools inspect apache/kvrocks:${{ steps.meta_tag.outputs.version }}
Loading