CI: fix release step env — multiline COMMIT_LOGS broke act_runner
Some checks failed
Forgejo Release Builder / release (push) Failing after 3m41s
Some checks failed
Forgejo Release Builder / release (push) Failing after 3m41s
Pass commit messages via tmp file + COMMIT_LOG_FILE in GITHUB_ENV instead of injecting COMMIT_LOGS into step env (Forgejo runner could fail before bash ran, producing no logs). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
7bca00964e
commit
e89f342881
1 changed files with 10 additions and 7 deletions
|
|
@ -120,11 +120,11 @@ jobs:
|
|||
commit_logs='- Initial release'
|
||||
fi
|
||||
|
||||
{
|
||||
echo 'COMMIT_LOGS<<EOF'
|
||||
printf '%s\n' "$commit_logs"
|
||||
echo 'EOF'
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
# Do not pass multiline commit text via step outputs / env (breaks some Forgejo/act_runner
|
||||
# runners before the shell starts — empty logs). Only pass a temp file path.
|
||||
commit_log_file="$(mktemp /tmp/komikku-commit-logs.XXXXXX)"
|
||||
printf '%s\n' "$commit_logs" > "${commit_log_file}"
|
||||
echo "COMMIT_LOG_FILE=${commit_log_file}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Set up Gradle
|
||||
shell: bash
|
||||
|
|
@ -304,12 +304,12 @@ jobs:
|
|||
UPSTREAM_REPO: ${{ steps.prepare.outputs.UPSTREAM_REPO }}
|
||||
UPSTREAM_REF: ${{ steps.prepare.outputs.UPSTREAM_REF }}
|
||||
UPSTREAM_BASE: ${{ steps.prepare.outputs.UPSTREAM_BASE }}
|
||||
COMMIT_LOGS: ${{ steps.prepare.outputs.COMMIT_LOGS }}
|
||||
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
REPOSITORY_NAME: ${{ github.repository }}
|
||||
FORGEJO_CURL_INSECURE: "true"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "Create or update release: shell running; COMMIT_LOG_FILE=${COMMIT_LOG_FILE:-<unset>}"
|
||||
|
||||
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH:-}"
|
||||
|
||||
|
|
@ -389,7 +389,10 @@ jobs:
|
|||
payload_file="$(mktemp)"
|
||||
response_file="$(mktemp)"
|
||||
|
||||
commit_logs="${COMMIT_LOGS:-}"
|
||||
commit_logs=""
|
||||
if [ -n "${COMMIT_LOG_FILE:-}" ] && [ -f "${COMMIT_LOG_FILE}" ]; then
|
||||
commit_logs="$(cat "${COMMIT_LOG_FILE}")"
|
||||
fi
|
||||
commit_logs="$(printf '%s' "$commit_logs" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
|
||||
if [ -z "$commit_logs" ]; then
|
||||
commit_logs="- Initial release"
|
||||
|
|
|
|||
Loading…
Reference in a new issue