initial Docker build commit
Build image / Build base frontend image (push) Failing after 24s

This commit is contained in:
2026-09-04 23:38:31 +04:00
parent 3b3c8ac3f1
commit b031af35d2
2 changed files with 57 additions and 2 deletions
+36 -2
View File
@@ -2,14 +2,48 @@ name: "Build image"
on: [push]
env: {}
permissions:
packages: write
jobs:
build:
name: Build
build-frontend:
name: Build base frontend image
runs-on: ubuntu-latest
outputs:
UI_HASH: ${{ steps.git-parse.outputs.PULP_UI_COMMIT }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Fetch commit hash for Pulp UI repository
id: git-parse
run: |
echo "PULP_UI_COMMIT=$(git -C vendor/pulp-ui rev-parse HEAD)" >> $GITEA_OUTPUT
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to built-in registry
uses: docker/login-action@v3
with:
registry: ${{ gitea.server_url }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ gitea.server_url }}/${{ gitea.repository }}
tags: |
type=sha,format=short
type=semver,pattern=${{ steps.git-parse.outputs.PULP_UI_COMMIT }}
- name: Build frontend image
uses: docker/build-push-action@v6
with:
context: vendor/pulp-ui
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# TODO: add build nginx image
+21
View File
@@ -0,0 +1,21 @@
FROM node:24-alpine AS builder
ARG PULP_UI_COMMIT
WORKDIR /app
RUN apk add --no-cache git && git config --global --add safe.directory /app
COPY package-lock.json /app/
RUN --mount=type=bind,source=package.json,target=./package.json \
--mount=type=cache,target=/root/.npm \
npm install --legacy-peer-deps --include=dev
COPY ./ /app
ENV PATH=/app/node_modules/.bin:$PATH PULP_UI_COMMIT=$PULP_UI_COMMIT
RUN npm run build
FROM scratch
WORKDIR /www-root
COPY --from=builder /app/dist /www-root