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

This commit is contained in:
2026-11-26 01:32:06 +03:00
parent b68cbaf649
commit 15dcbe3c44
8 changed files with 356 additions and 139 deletions
+9 -138
View File
@@ -19,141 +19,12 @@ concurrency:
cancel-in-progress: false
jobs:
check-and-update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Fetch latest GitHub release
id: release
uses: ./.gitea/actions/fetch-github-release
with:
repository: anomalyco/opencode
assets: opencode-desktop-linux-amd64.deb
version: ${{ inputs.version || '' }}
env:
# Optional: raises the GitHub API rate limit from 60 to 5000 req/h.
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Determine package state
id: state
if: steps.release.outputs.available == 'true'
shell: bash
run: |
set -euo pipefail
atom="dev-util/opencode-desktop-bin"
name="opencode-desktop-bin"
version="${{ steps.release.outputs.version }}"
forced="${{ steps.release.outputs.forced }}"
ebuild="${atom}/${name}-${version}.ebuild"
dist="${name}-${version}-amd64.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}"
- name: Create ebuild for latest version
id: latest
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true'
uses: ./.gitea/actions/copy-latest-ebuild-as
with:
atom: dev-util/opencode-desktop-bin
version: ${{ steps.release.outputs.version }}
- name: Keep only the newest ebuilds
id: prune
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true' && steps.release.outputs.forced != 'true'
uses: ./.gitea/actions/prune-ebuilds
with:
atom: dev-util/opencode-desktop-bin
keep: "3"
- name: Build new manifests
if: >-
steps.release.outputs.available == 'true' &&
steps.state.outputs.eligible == 'true' &&
(steps.latest.outputs.message != '' ||
steps.prune.outputs.message != '' ||
steps.state.outputs.up_to_date != 'true')
uses: ./.gitea/actions/pkgdev-manifest
with:
atom: dev-util/opencode-desktop-bin
cache-key: ${{ steps.release.outputs.version }}
- name: Check repo for validity
if: >-
steps.release.outputs.available == 'true' &&
steps.state.outputs.eligible == 'true' &&
(steps.latest.outputs.message != '' ||
steps.prune.outputs.message != '' ||
steps.state.outputs.up_to_date != 'true')
uses: pkgcore/pkgcheck-action@v1
with:
args: --keywords=-RedundantVersion dev-util/opencode-desktop-bin
- name: Check for changes
id: changes
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true'
shell: bash
run: |
set -euo pipefail
if [[ -n "$(git status --porcelain -- dev-util/opencode-desktop-bin)" ]]; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
else
echo "changed=false" >> "${GITHUB_OUTPUT}"
fi
- name: Compose commit message
id: commit
if: steps.changes.outputs.changed == 'true'
shell: bash
env:
ADDED: ${{ steps.latest.outputs.message }}
DROPPED: ${{ steps.prune.outputs.message }}
run: |
set -euo pipefail
message="dev-util/opencode-desktop-bin"
[[ -n "${DROPPED}" ]] && message+=" ${DROPPED}"
[[ -n "${ADDED}" ]] && message+=" ${ADDED}"
if [[ "${message}" == "dev-util/opencode-desktop-bin" ]]; then
message+=" update manifest"
fi
echo "message=${message}" >> "${GITHUB_OUTPUT}"
- name: Commit changes
if: steps.changes.outputs.changed == 'true'
uses: EndBug/add-and-commit@v9
with:
add: dev-util/opencode-desktop-bin
author_name: Automation
author_email: noreply@ratigorsk-12.ru
message: ${{ steps.commit.outputs.message }}
push: true
update:
uses: ./.gitea/workflows/github-release.yaml
with:
repository: anomalyco/opencode
atom: dev-util/opencode-desktop-bin
assets: opencode-desktop-linux-amd64.deb
keep: "3"
version: ${{ inputs.version || '' }}
secrets: inherit