Build forgejo-runner-node image / build (push) Failing after 30s
- Dockerfile.node extends node:22-bookworm + docker.io - CI workflow builds and pushes to forgejo registry on changes - values-node.yaml references custom image instead of stock node - Removes need to install docker in every workflow using node runner
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build forgejo-runner-node image
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'k8s/infra/forgejo-runner/Dockerfile.node'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: golang
|
|
env:
|
|
REGISTRY: forgejo.riotpiao.com
|
|
IMAGE: forgejo.riotpiao.com/rock/forgejo-runner-node
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get short SHA
|
|
id: sha
|
|
run: |
|
|
SHORT_SHA=$(git rev-parse --short HEAD)
|
|
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Registry login
|
|
run: |
|
|
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" \
|
|
--username "${REGISTRY_USER}" --password-stdin
|
|
env:
|
|
REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }}
|
|
REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
|
|
|
|
- name: Build image
|
|
run: |
|
|
docker build -f k8s/infra/forgejo-runner/Dockerfile.node \
|
|
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
|
|
-t "${IMAGE}:latest" \
|
|
.
|
|
|
|
- name: Push image
|
|
run: |
|
|
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|
|
docker push "${IMAGE}:latest"
|
|
echo "✓ Image pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
|