chore: fix GitHub Actions

This commit is contained in:
Paul Pan 2024-04-28 00:28:00 +08:00
parent 27a08ff264
commit 6f82b6b071
3 changed files with 4 additions and 7 deletions

View File

@ -9,8 +9,6 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Upgrade Podman
uses: gacts/install-podman@v1
# reference: https://github.com/containers/podman/discussions/17868
- name: Tar as root
run: |

View File

@ -1,8 +1,7 @@
# Base Env
FROM docker.io/library/node:slim AS base
RUN --mount=type=cache,target=/var/cache/apt \
apt-get update \
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl git gnupg \
&& rm -rf /var/lib/apt/lists/*
@ -13,11 +12,11 @@ WORKDIR /builder
# Builder
FROM base AS builder
ARG SENTRY_AUTH_TOKEN
COPY package.json /builder/package.json
COPY pnpm-lock.yaml /builder/pnpm-lock.yaml
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile
COPY . /builder
RUN pnpm install --frozen-lockfile

View File

@ -20,7 +20,7 @@ log_info "IMAGE: ${IMAGE_PREFIX}/woj-ui:${VERSION}"
log_info "SENTRY_AUTH_TOKEN: $(echo "$SENTRY_AUTH_TOKEN" | head -c 12)***"
log_info "=== Build ==="
$DOCKER build -t "${IMAGE_PREFIX}/woj-ui:${VERSION}" --env "SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}" . || { log_error "Build image failed!"; exit 1; }
$DOCKER build -t "${IMAGE_PREFIX}/woj-ui:${VERSION}" --build-arg "SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}" . || { log_error "Build image failed!"; exit 1; }
log_info "=== Push ==="
$DOCKER push "${IMAGE_PREFIX}/woj-ui:${VERSION}" || { log_error "Push image failed"; exit 1; }