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 99c9d64 commit 407f228
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 39 deletions.
44 changes: 5 additions & 39 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
latest:
description: if tag latest
required: false
latest_major:
description: if tag latest major version
required: false
workdir:
description: workdir
required: true
Expand All @@ -24,45 +27,8 @@ runs:
PHP_DEV: ${{ inputs.dev }}
WODBY_USER_ID: ${{ inputs.user_id }}
LATEST: ${{ inputs.latest }}
LATEST_MAJOR: ${{ inputs.latest_major }}
run: |
set -ex
if [[ "${GITHUB_REF}" == refs/heads/master || "${GITHUB_REF}" == refs/tags/* ]]; then
minor_ver="${PHP_VER%.*}"
minor_tag="${minor_ver}"
major_tag="${minor_ver%.*}"
if [[ -n "${PHP_DEV}" ]]; then
if [[ "${WODBY_USER_ID}" == "501" ]]; then
minor_tag="${minor_tag}-dev-macos"
major_tag="${major_tag}-dev-macos"
else
minor_tag="${minor_tag}-dev"
major_tag="${major_tag}-dev"
fi
fi
tags=("${minor_tag}" "${major_tag}")
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
stability_tag=("${GITHUB_REF##*/}")
tags=("${minor_tag}-${stability_tag}" "${major_tag}-${stability_tag}")
else
if [[ -n "${LATEST}" ]]; then
if [[ -z "${PHP_DEV}" ]]; then
tags+=("latest")
else
if [[ "${WODBY_USER_ID}" == "501" ]]; then
tags+=("dev-macos")
else
tags+=("dev")
fi
fi
fi
fi
for tag in "${tags[@]}"; do
make buildx-imagetools-create IMAGETOOLS_TAG=${tag}
done
fi
. $GITHUB_ACTION_PATH/release.sh
shell: bash
working-directory: ${{ inputs.workdir }}
52 changes: 52 additions & 0 deletions .github/actions/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash

set -ex

if [[ "${GITHUB_REF}" == refs/heads/master || "${GITHUB_REF}" == refs/tags/* ]]; then
minor_ver="${PHP_VER%.*}"
minor_tag="${minor_ver}"
major_tag="${minor_ver%.*}"

if [[ -n "${PHP_DEV}" ]]; then
if [[ "${WODBY_USER_ID}" == "501" ]]; then
minor_tag="${minor_tag}-dev-macos"
if [[ -n "${LATEST_MAJOR}" ]]; then
major_tag="${major_tag}-dev-macos"
fi
else
minor_tag="${minor_tag}-dev"
if [[ -n "${LATEST_MAJOR}" ]]; then
major_tag="${major_tag}-dev"
fi
fi
fi

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

if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
stability_tag=("${GITHUB_REF##*/}")
tags=("${minor_tag}-${stability_tag}")
if [[ -n "${LATEST_MAJOR}" ]]; then
tags+=("${major_tag}-${stability_tag}")
fi
else
if [[ -n "${LATEST}" ]]; then
if [[ -z "${PHP_DEV}" ]]; then
tags+=("latest")
else
if [[ "${WODBY_USER_ID}" == "501" ]]; then
tags+=("dev-macos")
else
tags+=("dev")
fi
fi
fi
fi

for tag in "${tags[@]}"; do
make buildx-imagetools-create IMAGETOOLS_TAG=${tag}
done
fi
1 change: 1 addition & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
dev: ${{ matrix.dev }}
user_id: ${{ matrix.user_id }}
latest: true
latest_major: true

php83-build:
strategy:
Expand Down

0 comments on commit 407f228

Please sign in to comment.