Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Jan 29, 2025
1 parent ab1f2ef commit 0f631e4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,17 @@ inputs:
latest:
description: if tag latest
required: false
latest_major:
description: if tag latest major version
required: false
runs:
using: "composite"
steps:
- name: Build image
env:
VERSION: ${{ inputs.version }}
LATEST: ${{ inputs.latest }}
LATEST_MAJOR: ${{ inputs.latest_major }}
run: |
if [[ "${GITHUB_REF}" == refs/heads/main || "${GITHUB_REF}" == refs/tags/* ]]; then
minor_ver="${VERSION%.*}"
major_ver="${minor_ver%.*}"
tags=("${minor_ver}" "${major_ver}")
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
stability_tag=("${GITHUB_REF##*/}")
tags=("${minor_ver}-${stability_tag}" "${major_ver}-${stability_tag}")
else
if [[ -n "${LATEST}" ]]; then
tags+=("latest")
fi
fi
for tag in "${tags[@]}"; do
TAG=${tag} make buildx-imagetools-create
done
fi
. $GITHUB_ACTION_PATH/release.sh
shell: bash
30 changes: 30 additions & 0 deletions .github/actions/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

set -exo pipefail

if [[ "${GITHUB_REF}" == refs/heads/main || "${GITHUB_REF}" == refs/tags/* ]]; then
minor_ver="${VERSION%.*}"
major_ver="${minor_ver%.*}"

tags=("${minor_ver}")

if [[ -n "${LATEST_MAJOR}" ]]; then
tags+=("${major_ver}")
fi

if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
stability_tag=("${GITHUB_REF##*/}")
tags=("${minor_ver}-${stability_tag}")
if [[ -n "${LATEST_MAJOR}" ]]; then
tags+=("${major_ver}-${stability_tag}")
fi
else
if [[ -n "${LATEST}" ]]; then
tags+=("latest")
fi
fi

for tag in "${tags[@]}"; do
make buildx-imagetools-create TAG=${tag}
done
fi
2 changes: 2 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
with:
version: ${{ env.VALKEY80 }}
latest: true
latest_major: true

valkey72-build:
strategy:
Expand Down Expand Up @@ -101,3 +102,4 @@ jobs:
- uses: ./.github/actions
with:
version: ${{ env.VALKEY72 }}
latest_major: true

0 comments on commit 0f631e4

Please sign in to comment.