new ebuild: dev-embedded/esphome-desktop-bin
yandex-music / check-and-update (push) Successful in 2m19s
github-release / check-and-update (push) Successful in 28s
esphome-desktop-bin / update (push) Successful in 28s
github-release / check-and-update (push) Successful in 30s
opencode-desktop-bin / update (push) Successful in 31s
yandex-music / check-and-update (push) Successful in 2m19s
github-release / check-and-update (push) Successful in 28s
esphome-desktop-bin / update (push) Successful in 28s
github-release / check-and-update (push) Successful in 30s
opencode-desktop-bin / update (push) Successful in 31s
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
name: "Determine package state"
|
||||
description: "Check whether the requested release needs a new ebuild or a manifest update"
|
||||
inputs:
|
||||
atom:
|
||||
description: "category/name package atom"
|
||||
required: true
|
||||
version:
|
||||
description: "release version without the v prefix"
|
||||
required: true
|
||||
forced:
|
||||
description: "true when the version was supplied manually"
|
||||
required: false
|
||||
default: "false"
|
||||
arch:
|
||||
description: "architecture suffix used in the distfile name"
|
||||
required: false
|
||||
default: "amd64"
|
||||
outputs:
|
||||
eligible:
|
||||
description: "false when the requested release is older than the newest ebuild"
|
||||
value: ${{ steps.state.outputs.eligible }}
|
||||
up_to_date:
|
||||
description: "true when the ebuild and its Manifest entry already exist"
|
||||
value: ${{ steps.state.outputs.up_to_date }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: state
|
||||
shell: bash
|
||||
env:
|
||||
ATOM: ${{ inputs.atom }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
FORCED: ${{ inputs.forced }}
|
||||
ARCH: ${{ inputs.arch }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
name="${ATOM##*/}"
|
||||
ebuild="${ATOM}/${name}-${VERSION}.ebuild"
|
||||
dist="${name}-${VERSION}-${ARCH}.deb"
|
||||
|
||||
shopt -s nullglob
|
||||
existing=( "${ATOM}/${name}-"*.ebuild )
|
||||
highest_existing=""
|
||||
if (( ${#existing[@]} > 0 )); then
|
||||
highest_existing=$(
|
||||
printf '%s\n' "${existing[@]}" \
|
||||
| sed -e "s|^.*/${name}-||" -e 's|\.ebuild$||' \
|
||||
| sort -V \
|
||||
| tail -n 1
|
||||
)
|
||||
fi
|
||||
|
||||
eligible=true
|
||||
if [[ "${FORCED}" != "true" && -n "${highest_existing}" ]]; then
|
||||
highest=$(printf '%s\n%s\n' "${highest_existing}" "${VERSION}" | sort -V | tail -n 1)
|
||||
if [[ "${highest}" != "${VERSION}" ]]; then
|
||||
echo "Selected release ${VERSION} is older than ${highest_existing}; skipping" >&2
|
||||
eligible=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "${ebuild}" ]] \
|
||||
&& grep -q "^DIST ${dist} " "${ATOM}/Manifest" 2>/dev/null; then
|
||||
up_to_date=true
|
||||
else
|
||||
up_to_date=false
|
||||
fi
|
||||
|
||||
echo "eligible=${eligible}" >> "${GITHUB_OUTPUT}"
|
||||
echo "up_to_date=${up_to_date}" >> "${GITHUB_OUTPUT}"
|
||||
@@ -5,7 +5,7 @@ inputs:
|
||||
description: "GitHub repository in owner/name form"
|
||||
required: true
|
||||
assets:
|
||||
description: "space separated release asset names that must be available"
|
||||
description: "space separated release asset names; {version} and {tag} are expanded"
|
||||
required: false
|
||||
default: ""
|
||||
version:
|
||||
@@ -76,6 +76,10 @@ runs:
|
||||
tag="v${version}"
|
||||
available=true
|
||||
for asset in ${assets}; do
|
||||
# Allow version-dependent asset names such as
|
||||
# "ESPHome.Device.Builder_{version}_amd64.deb".
|
||||
asset="${asset//'{version}'/${version}}"
|
||||
asset="${asset//'{tag}'/${tag}}"
|
||||
url="https://github.com/${repo}/releases/download/${tag}/${asset}"
|
||||
echo "Checking ${url}"
|
||||
if ! curl -fsSIL -o /dev/null "${url}"; then
|
||||
|
||||
Reference in New Issue
Block a user