From 4b3a991b91aa3fb63a6452260a40374fb8dcc494 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 11 Oct 2023 23:35:39 +0100 Subject: [PATCH 1/3] update to nodejs 20 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f42c762..68e626f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Install dependencies only when needed -FROM node:19 AS deps +FROM node:20 AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. #RUN apk add libc6-compat WORKDIR /app @@ -20,7 +20,7 @@ RUN \ fi # Rebuild the source code only when needed -FROM node:19 AS builder +FROM node:20 AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -31,7 +31,7 @@ ENV NEXT_TELEMETRY_DISABLED 1 RUN yarn build # Production image, copy all the files and run next -FROM node:19-alpine AS runner +FROM node:20-alpine AS runner WORKDIR /app ENV NODE_ENV production From a55027ef68f1131448e85b91c02438685fa6102e Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 11 Oct 2023 23:37:41 +0100 Subject: [PATCH 2/3] update action tasks --- .gitea/workflows/publish.yaml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index 8399ee4..728d0ca 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -10,6 +10,10 @@ jobs: runs-on: ubuntu-22.04 container: fascinated/docker-images:node-latest steps: + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v7 + - name: checkout uses: actions/checkout@v3 @@ -22,9 +26,29 @@ jobs: username: ${{ secrets.REPO_USERNAME }} password: ${{ secrets.REPO_TOKEN }} - - name: Build and push + - name: Restore Docker Build Cache + uses: actions/cache@v3 + id: build-cache + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx + + - name: Build and Push (Latest) uses: docker/build-push-action@v4 + if: steps.branch-name.outputs.current_branch == 'master' with: push: true context: . tags: fascinated/beatsaber-overlay:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + + - name: Build and Push (Other Branches) + uses: docker/build-push-action@v4 + if: steps.branch-name.outputs.current_branch != 'master' + with: + push: true + context: . + tags: fascinated/beatsaber-overlay:${{ steps.branch-name.outputs.current_branch }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache From 37e60a8425ceebe3af44fa37fb4ef3a6da5a5808 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 11 Oct 2023 23:40:09 +0100 Subject: [PATCH 3/3] add dev branch to action --- .gitea/workflows/publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index 728d0ca..ab461f4 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -4,6 +4,7 @@ on: push: branches: - "main" + - "development" jobs: docker: