Update init.yml

This commit is contained in:
2025-12-16 15:33:58 -06:00
parent a0a7d2c7e2
commit f359fb966b

View File

@@ -1,23 +1,27 @@
name: Init Repo Context
on:
workflow_dispatch:
permissions:
contents: read
jobs:
init:
runs-on: ubuntu-latest
steps:
- name: Initialize update server repository context
id: init
shell: bash
run: |
set -e
set -euo pipefail
# Canonical repo identifiers
REPO_SLUG="${GITHUB_REPOSITORY}" # owner/repo
REPO_NAME="${GITHUB_REPOSITORY##*/}" # repo
REPO_SLUG="${GITHUB_REPOSITORY}"
SERVER_URL="${GITHUB_SERVER_URL:-https://github.com}"
# Update server XML source repository URL
UPDATE_XML_REPO_URL="${SERVER_URL}/${REPO_SLUG}"
echo "Resolved repository slug: ${REPO_SLUG}"
echo "Resolved repository name: ${REPO_NAME}"
echo "Resolved update XML repo URL: ${UPDATE_XML_REPO_URL}"
echo "update_xml_repo_url=${UPDATE_XML_REPO_URL}" >> "$GITHUB_OUTPUT"
# Export for downstream steps
{
echo "repo_slug=${REPO_SLUG}"
echo "repo_name=${REPO_NAME}"
echo "update_xml_repo_url=${UPDATE_XML_REPO_URL}"
} >> "$GITHUB_OUTPUT"
- name: Print resolved value
run: |
echo "UPDATE_XML_REPO_URL=${{ steps.init.outputs.update_xml_repo_url }}"