mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-08-03 10:14:43 +00:00
42
.github/workflows/harbor.yml
vendored
Normal file
42
.github/workflows/harbor.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Publish to Harbor
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
legacy-frontend:
|
||||
name: Build and push to Harbor
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "recursive"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Harbor
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.stoatinternal.com
|
||||
username: ${{ secrets.HARBOR_USERNAME }}
|
||||
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
registry.stoatinternal.com/stoat/legacy-frontend:${{ github.sha }}
|
||||
registry.stoatinternal.com/stoat/legacy-frontend:latest
|
||||
build-args: |
|
||||
REVOLT_PUBLIC_URL=https://api.stoat.chat/
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -13,6 +13,10 @@ RUN yarn workspaces focus --production --all
|
||||
|
||||
FROM node:24-alpine
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
ARG REVOLT_PUBLIC_URL=https://api.stoat.chat/
|
||||
ENV REVOLT_PUBLIC_URL=$REVOLT_PUBLIC_URL
|
||||
|
||||
COPY docker/package.json docker/yarn.lock .
|
||||
RUN yarn install --frozen-lockfile
|
||||
COPY --from=builder --exclude=package.json --exclude=yarn.lock --exclude=.yarn* --exclude=.git --exclude=external --exclude=node_modules /usr/src/app .
|
||||
|
||||
Reference in New Issue
Block a user