mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-29 14:37:47 -04:00
ci: dispatch distro builds from Release & guard shared Void index
(cherry picked from commit 3388f78905)
This commit is contained in:
1 parent
6d00fd7295
commit
fe1241bf91
4 files changed
+109
-13
No files matched your search
@@ -103,5 +103,5 @@ jobs:
|
||||
{
|
||||
echo "## ${{ steps.derive.outputs.tag }} tagged on ${{ steps.derive.outputs.branch }} — Release workflow dispatched"
|
||||
echo ""
|
||||
echo "Distro builds are manual: run the per-distro workflows (COPR/OBS/PPA/XBPS) once the release is published."
|
||||
echo "Distro builds (COPR/OBS/PPA/XBPS) are dispatched by the Release workflow once the release is published."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -559,3 +559,38 @@ jobs:
|
||||
set -euo pipefail
|
||||
gh workflow run pin-release.yml --repo "$REPO" -f version="$TAG"
|
||||
echo "dispatched pin-release ${TAG} to ${REPO}" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
# Build the stable dms package on every distro channel. Runs after the
|
||||
# release job so every asset the packaging scripts download already exists.
|
||||
distros:
|
||||
name: Dispatch ${{ matrix.workflow }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [release]
|
||||
if: ${{ !contains(inputs.tag, '-') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- workflow: run-copr.yml
|
||||
args: -f package=dms -f version=__VERSION__ -f release=1
|
||||
- workflow: run-obs.yml
|
||||
args: -f package=dms
|
||||
- workflow: run-ppa.yml
|
||||
args: -f package=dms
|
||||
- workflow: run-xbps.yml
|
||||
args: -f version=__TAG__ -f build_dms=true -f build_git=false
|
||||
steps:
|
||||
- name: Dispatch packaging workflow
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
WORKFLOW: ${{ matrix.workflow }}
|
||||
ARGS: ${{ matrix.args }}
|
||||
TAG: ${{ inputs.tag }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION="${TAG#v}"
|
||||
ARGS="${ARGS//__VERSION__/$VERSION}"
|
||||
ARGS="${ARGS//__TAG__/$TAG}"
|
||||
# shellcheck disable=SC2086
|
||||
gh workflow run "$WORKFLOW" --repo "${{ github.repository }}" $ARGS
|
||||
echo "dispatched ${WORKFLOW} for ${TAG} (${ARGS})" >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -3,9 +3,7 @@ name: Void Linux XBPS Repository
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 2,5,14,17,20,23 * * *" # 9am, 12pm, 3pm, 6pm, 9pm, 12am EST (UTC times shown)
|
||||
# release trigger disabled; dispatch manually after a release
|
||||
# release:
|
||||
# types: [published]
|
||||
# Stable builds are dispatched by release.yml after the release assets exist.
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
@@ -49,7 +47,9 @@ jobs:
|
||||
run: |
|
||||
SHOULD_BUILD=true
|
||||
if [ "${{ github.event_name }}" = "schedule" ]; then
|
||||
PUBLISHED_COMMIT="$(curl -fsSL --retry 3 "$MANIFEST_URL" | jq -r '.source_commit // empty' 2>/dev/null || true)"
|
||||
# dms/current is shared with dux-packaging; read this repo's own entry
|
||||
PUBLISHED_COMMIT="$(curl -fsSL --retry 3 "$MANIFEST_URL" \
|
||||
| jq -r --arg repo "${{ github.repository }}" '.sources[$repo] // .source_commit // empty' 2>/dev/null || true)"
|
||||
if [ "$PUBLISHED_COMMIT" = "${{ github.sha }}" ]; then
|
||||
SHOULD_BUILD=false
|
||||
echo "${{ github.sha }} is already published; skipping the scheduled build."
|
||||
|
||||
Reference in new issue
Block a user