Skip to content

Commit

Permalink
Update docker.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored May 22, 2024
1 parent 3c73de7 commit 176b998
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,27 @@ jobs:
- name: show version
if: ${{ github.ref == 'refs/heads/latest' }}
run: |
docker run --rm --entrypoint valkey-cli ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} --version
docker run --rm --entrypoint valkey-server ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} --version
docker run --rm --entrypoint valkey-cli ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} --version
docker run --rm --entrypoint valkey-server ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }} --version
- name: copy valkey binary
if: ${{ github.ref == 'refs/heads/latest' }}
run: |
docker run -d --pull always --platform amd64 --name valkey-x86_64 ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker cp valkey-x86_64:/usr/local/bin/valkey-server valkey-cli-x86_64
docker cp valkey-x86_64:/usr/local/bin/valkey-server valkey-server-x86_64
docker run -d --pull always --platform arm64 --name valkey-aarch64 ${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker cp valkey-aarch64:/usr/local/bin/valkey-server valkey-cli-aarch64
docker cp valkey-aarch64:/usr/local/bin/valkey-server valkey-server-aarch64
- uses: actions/upload-artifact@v4
if: ${{ github.ref == 'refs/heads/latest' }}
with:
name: artifacts
path: |
valkey-cli-x86_64
valkey-server-x86_64
valkey-cli-aarch64
valkey-server-aarch64
- uses: crowbarmaster/GH-Automatic-Releases@latest
if: ${{ github.ref == 'refs/heads/latest' }}
Expand All @@ -81,7 +87,9 @@ jobs:
title: ${{ steps.version.outputs.version }}
automatic_release_tag: ${{ steps.version.outputs.version }}
files: |
valkey-cli-x86_64
valkey-server-x86_64
valkey-cli-aarch64
valkey-server-aarch64
- name: Set PR-Number (PR)
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -98,20 +106,26 @@ jobs:
tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}
- name: show version (PR)
if: ${{ github.event_name == 'pull_request' }}
run: docker run --rm --entrypoint valkey-server ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} --version
run: |
docker run --rm --entrypoint valkey-cli ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} --version
docker run --rm --entrypoint valkey-server ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} --version
- name: copy valkey binary (PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
docker run -d --pull always --platform amd64 --name valkey-x86_64 ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}
docker cp valkey-x86_64:/usr/local/bin/valkey-server valkey-cli-x86_64
docker cp valkey-x86_64:/usr/local/bin/valkey-server valkey-server-x86_64
docker run -d --pull always --platform arm64 --name valkey-aarch64 ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}
docker cp valkey-aarch64:/usr/local/bin/valkey-server valkey-cli-aarch64
docker cp valkey-aarch64:/usr/local/bin/valkey-server valkey-server-aarch64
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: artifacts
path: |
valkey-cli-x86_64
valkey-server-x86_64
valkey-cli-aarch64
valkey-server-aarch64
- name: add comment (PR)
uses: mshick/add-pr-comment@v2
Expand Down

0 comments on commit 176b998

Please sign in to comment.