This commit is contained in:
+5
-2
@@ -173,8 +173,11 @@ Pterodactyl is responsible for Java, server process management and resources.
|
|||||||
|
|
||||||
Kubernetes/SWS provides static hosting for the published Packwiz repositories.
|
Kubernetes/SWS provides static hosting for the published Packwiz repositories.
|
||||||
The publishing workflow runs [`scripts/build-site.sh`](../scripts/build-site.sh),
|
The publishing workflow runs [`scripts/build-site.sh`](../scripts/build-site.sh),
|
||||||
which exports committed Git revisions into the documented URL layout, then
|
which exports committed Git revisions into the documented URL layout. Source
|
||||||
builds the multi-architecture image
|
packs intentionally keep `no-internal-hashes = true`; the workflow runs
|
||||||
|
`packwiz refresh --build` only against the exported copies under `.build/site`
|
||||||
|
so the image contains installer-ready hashes without committing generated hash
|
||||||
|
churn. It then builds the multi-architecture image
|
||||||
`tea.ahmza.com/ahmza.com/mcpacks-site`.
|
`tea.ahmza.com/ahmza.com/mcpacks-site`.
|
||||||
|
|
||||||
The workflow finally commits that image's immutable OCI digest to
|
The workflow finally commits that image's immutable OCI digest to
|
||||||
|
|||||||
@@ -36,6 +36,17 @@ jobs:
|
|||||||
# explicitly ensures /dev still contains today's development branch.
|
# explicitly ensures /dev still contains today's development branch.
|
||||||
run: git fetch origin main:refs/remotes/origin/main --tags --force
|
run: git fetch origin main:refs/remotes/origin/main --tags --force
|
||||||
|
|
||||||
|
- name: Set up Go for Packwiz
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23.x"
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: Install pinned Packwiz
|
||||||
|
# Packwiz has no stable binary release channel. Pinning the source
|
||||||
|
# revision makes image builds reproducible instead of following latest.
|
||||||
|
run: go install github.com/packwiz/packwiz@dfd8b68a4796c763e25bad50265ea1f1233e24f1
|
||||||
|
|
||||||
- name: Assemble static Packwiz site
|
- name: Assemble static Packwiz site
|
||||||
env:
|
env:
|
||||||
EVENT_REF: ${{ gitea.ref }}
|
EVENT_REF: ${{ gitea.ref }}
|
||||||
@@ -50,8 +61,13 @@ jobs:
|
|||||||
refs/tags/*) dev_ref=origin/main ;;
|
refs/tags/*) dev_ref=origin/main ;;
|
||||||
*) dev_ref=$EVENT_SHA ;;
|
*) dev_ref=$EVENT_SHA ;;
|
||||||
esac
|
esac
|
||||||
|
PACKWIZ_BIN="$(go env GOPATH)/bin/packwiz" \
|
||||||
./scripts/build-site.sh "$dev_ref"
|
./scripts/build-site.sh "$dev_ref"
|
||||||
test -s .build/site/forever/dev/pack.toml
|
test -s .build/site/forever/dev/pack.toml
|
||||||
|
grep -q '^hash = "[0-9a-f]\{64\}"$' \
|
||||||
|
.build/site/forever/dev/pack.toml
|
||||||
|
# Building distribution metadata must not alter tracked source packs.
|
||||||
|
git diff --exit-code -- forever playground
|
||||||
|
|
||||||
- name: Verify tagged release output
|
- name: Verify tagged release output
|
||||||
if: startsWith(gitea.ref, 'refs/tags/')
|
if: startsWith(gitea.ref, 'refs/tags/')
|
||||||
|
|||||||
@@ -8,10 +8,16 @@ repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|||||||
cd "$repo_root"
|
cd "$repo_root"
|
||||||
|
|
||||||
dev_ref=${1:-HEAD}
|
dev_ref=${1:-HEAD}
|
||||||
|
packwiz_bin=${PACKWIZ_BIN:-packwiz}
|
||||||
build_root="$repo_root/.build"
|
build_root="$repo_root/.build"
|
||||||
site_root="$build_root/site"
|
site_root="$build_root/site"
|
||||||
work_root="$build_root/work"
|
work_root="$build_root/work"
|
||||||
|
|
||||||
|
if ! command -v "$packwiz_bin" >/dev/null 2>&1; then
|
||||||
|
echo "Packwiz executable not found: $packwiz_bin" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf "$site_root" "$work_root"
|
rm -rf "$site_root" "$work_root"
|
||||||
mkdir -p "$site_root/forever/releases" "$work_root"
|
mkdir -p "$site_root/forever/releases" "$work_root"
|
||||||
|
|
||||||
@@ -30,6 +36,13 @@ export_pack() {
|
|||||||
|
|
||||||
git archive "$revision" "$pack" | tar -x -C "$scratch"
|
git archive "$revision" "$pack" | tar -x -C "$scratch"
|
||||||
mv "$scratch/$pack" "$destination"
|
mv "$scratch/$pack" "$destination"
|
||||||
|
|
||||||
|
# Source packs intentionally omit internal hashes. Generate the distributable
|
||||||
|
# index only in the ephemeral image-build tree, never in the Git checkout.
|
||||||
|
(
|
||||||
|
cd "$destination"
|
||||||
|
"$packwiz_bin" refresh --build
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# main is always the development source, including when this script runs for a
|
# main is always the development source, including when this script runs for a
|
||||||
|
|||||||
Reference in New Issue
Block a user