mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-05-24 10:29:11 +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
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
@ -2,8 +2,8 @@ name: Docker Build and Push
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
concurrency:
|
||||
group: "docker-image"
|
||||
@ -27,12 +27,15 @@ jobs:
|
||||
with:
|
||||
registry: ghcr.io
|
||||
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
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
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
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm install && \
|
||||
npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user