Update init.yml
This commit is contained in:
36
.github/workflows/init.yml
vendored
36
.github/workflows/init.yml
vendored
@@ -1,23 +1,27 @@
|
||||
- name: Initialize update server repository context
|
||||
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 }}"
|
||||
|
||||
Reference in New Issue
Block a user