Skip to content

Commit

Permalink
Test parallel multi-arch build
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Jan 28, 2025
1 parent ec6f868 commit 919a4a5
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ runs:
PLATFORM: ${{ inputs.platform }}
run: |
set -e
make buildx-build-amd64
make test
make buildx-build
make test
. $GITHUB_ACTION_PATH/release.sh
shell: bash
2 changes: 0 additions & 2 deletions .github/actions/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
set -e

if [[ "${GITHUB_REF}" == refs/heads/main || "${GITHUB_REF}" == refs/tags/* ]]; then
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"

if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
export STABILITY_TAG="${GITHUB_REF##*/}"
fi
Expand Down
79 changes: 62 additions & 17 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,78 @@ on:
- '*'

env:
VALKEY80: '8.0.2'
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

jobs:
valkey80:
valkey80-amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/setup-buildx-action@v3
- uses: ./.github/actions
with:
version: ${{ env.VALKEY80 }}
tags: 8.0-amd64
platform: linux/amd64
valkey80-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
platforms: amd64,arm64
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/setup-buildx-action@v3
- uses: ./.github/actions
with:
version: '8.0.2'
tags: 8.0,8,latest
platform: linux/amd64,linux/arm64
valkey72:
version: ${{ env.VALKEY80 }}
tags: 8.0-arm64
platform: linux/arm64
valkey80:
runs-on: ubuntu-latest
needs:
- valkey80-amd64
- valkey80-arm64
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64
- uses: docker/setup-buildx-action@v3
- uses: ./.github/actions
with:
version: '7.2.8'
tags: 7.2,7
platform: linux/amd64,linux/arm64
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create Multi-Arch Manifest
run: |
if [[ "${GITHUB_REF}" == refs/heads/main || "${GITHUB_REF}" == refs/tags/* ]]; then
TAGS=("8.0" "8" "latest")
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
TAGS+=("${GITHUB_REF##*/}")
fi
for TAG in "${TAGS[@]}"; do
docker manifest create wodby/valkey:$TAG \
wodby/valkey:80-amd64 \
wodby/valkey:80-arm64

docker manifest push wodby/valkey:$TAG
done
fi

# valkey72:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: docker/setup-qemu-action@v3
# with:
# platforms: amd64,arm64
# - uses: docker/setup-buildx-action@v3
# - uses: ./.github/actions
# with:
# version: '7.2.8'
# tags: 7.2,7
# platform: linux/amd64,linux/arm64

0 comments on commit 919a4a5

Please sign in to comment.