Add yq to forgejo-runner and replace sed YAML edits #180
4 changed files with 11 additions and 3 deletions
|
|
@ -234,7 +234,7 @@ jobs:
|
|||
RELEASE_URL="https://forge.ops.eblu.me/eblume/blumeops/releases/download/${VERSION}/${TARBALL}"
|
||||
|
||||
echo "Updating $DEPLOYMENT_FILE with new release URL..."
|
||||
sed -i "s|value: \"https://forge.ops.eblu.me/eblume/blumeops/releases/download/[^\"]*\"|value: \"${RELEASE_URL}\"|" "$DEPLOYMENT_FILE"
|
||||
yq -i "(.spec.template.spec.containers[0].env[] | select(.name == \"DOCS_RELEASE_URL\")).value = \"${RELEASE_URL}\"" "$DEPLOYMENT_FILE"
|
||||
|
||||
echo "Updated deployment:"
|
||||
grep -A1 "DOCS_RELEASE_URL" "$DEPLOYMENT_FILE"
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ jobs:
|
|||
RELEASE_URL="https://forge.ops.eblu.me/api/packages/eblume/generic/cv/${VERSION}/${TARBALL}"
|
||||
|
||||
echo "Updating $DEPLOYMENT_FILE with CV_RELEASE_URL..."
|
||||
sed -i "s|value: \"https://forge.ops.eblu.me/api/packages/eblume/generic/cv/[^\"]*\"|value: \"${RELEASE_URL}\"|" "$DEPLOYMENT_FILE"
|
||||
yq -i "(.spec.template.spec.containers[0].env[] | select(.name == \"CV_RELEASE_URL\")).value = \"${RELEASE_URL}\"" "$DEPLOYMENT_FILE"
|
||||
|
||||
echo "Updated deployment:"
|
||||
grep -A1 "CV_RELEASE_URL" "$DEPLOYMENT_FILE"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# The host runner daemon creates containers from this image to run workflow steps.
|
||||
#
|
||||
# Build logic (container images, docs site) runs inside Dagger containers,
|
||||
# so this image only needs: git, Docker CLI, Dagger CLI, ArgoCD CLI, uv, and basic tools.
|
||||
# so this image only needs: git, Docker CLI, Dagger CLI, ArgoCD CLI, uv, yq, and basic tools.
|
||||
#
|
||||
# Usage: Configure runner with label like:
|
||||
# docker:docker://registry.ops.eblu.me/blumeops/forgejo-runner:latest
|
||||
|
|
@ -59,6 +59,13 @@ RUN ARCH="${TARGETARCH:-$(dpkg --print-architecture)}" \
|
|||
&& rm /tmp/dagger.tar.gz \
|
||||
&& dagger version
|
||||
|
||||
# Install yq (for editing YAML files in workflows)
|
||||
RUN ARCH="${TARGETARCH:-$(dpkg --print-architecture)}" \
|
||||
&& curl -fsSL -o /usr/local/bin/yq \
|
||||
"https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${ARCH}" \
|
||||
&& chmod +x /usr/local/bin/yq \
|
||||
&& yq --version
|
||||
|
||||
# Install flyctl (for Fly.io cache purge after docs deploy)
|
||||
RUN curl -L https://fly.io/install.sh | sh \
|
||||
&& mv /root/.fly/bin/flyctl /usr/local/bin/fly \
|
||||
|
|
|
|||
1
docs/changelog.d/feature-yq-in-runner.infra.md
Normal file
1
docs/changelog.d/feature-yq-in-runner.infra.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Add yq to forgejo-runner container and replace sed-based YAML editing in workflows with yq
|
||||
Loading…
Add table
Add a link
Reference in a new issue