mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-05-24 18:39:12 +00:00
Infra: Build container image for all branches (#5)
* infra: Build images for all branches without the need of tags. Stop using latest tag on container image. * Fix npm install on docker There are errors when the branch is not ready to be merged. This is a temporary fix to make the docker image buildable on all branches.
This commit is contained in:
parent
fddd0582e8
commit
40ca7d4b6e
15
.github/workflows/docker.yml
vendored
15
.github/workflows/docker.yml
vendored
@ -2,8 +2,8 @@ name: Docker Build and Push
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
branches:
|
||||||
- "*"
|
- '**'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "docker-image"
|
group: "docker-image"
|
||||||
@ -27,12 +27,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GH_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Downcase REPO variable
|
||||||
|
run: |
|
||||||
|
echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
tags: ghcr.io/${{ env.REPO }}:${{ github.ref_name }}, ghcr.io/${{ env.REPO }}:${{ github.sha }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
FROM node:20-alpine AS build
|
FROM node:20-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm install && \
|
||||||
|
npm ci
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user