fix(KAN-58): avoid admin API in macOS release workflow
CI/CD / preconditions (pull_request) Successful in 1s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 58s
macOS checks / Native Rust tests and unsigned build (pull_request) Successful in 3m22s
CI/CD / Publish immutable image (pull_request) Canceled after 0s
CI/CD / test_and_check_app (pull_request) Canceled after 4m18s

This commit is contained in:
2026-09-27 11:13:13 +02:00
parent 1c620654a3
commit f52cffeaeb
2 changed files with 154 additions and 18 deletions
+2 -18
View File
@@ -2,6 +2,8 @@ name: macOS release to Hetzner
on:
push:
# Gitea enforces the configured macos-v* protection when tags are pushed.
# Reading /tag_protections requires admin rights unavailable to job tokens.
tags:
- "macos-v*"
workflow_dispatch:
@@ -69,24 +71,6 @@ jobs:
with:
node-version: 22
- name: Require protected macOS release tags
shell: bash
env:
GITEA_TOKEN: ${{ github.token }}
run: |
set -Eeuo pipefail
curl --fail --silent --show-error \
--header "Authorization: Bearer $GITEA_TOKEN" \
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/tag_protections" \
--output "$RUNNER_TEMP/macos-tag-protections.json"
node --input-type=module - <<'JS'
import { readFileSync } from 'node:fs';
const rules = JSON.parse(readFileSync(`${process.env.RUNNER_TEMP}/macos-tag-protections.json`, 'utf8'));
if (!rules.some((rule) => rule.name_pattern === 'macos-v*')) {
throw new Error('Configure a protected macos-v* tag rule in Gitea before publishing.');
}
JS
- name: Validate app versions and Hetzner configuration
env:
RELEASE_TAG: ${{ steps.ref.outputs.tag }}