From c41ec09aba8fcd656478fa2cff9b00d12ecf9a44 Mon Sep 17 00:00:00 2001 From: dfunkt Date: Fri, 2 Aug 2024 16:34:28 +0300 Subject: [PATCH] Update Github Actions & Dockerfile - switch to latest version of Dockerfile to enable linter - fix FromAsCasing warning --- .github/workflows/release.yml | 8 ++++---- Dockerfile | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fa1407..dffd084 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: HAVE_GHCR_LOGIN: ${{ vars.GHCR_REPO != '' && github.repository_owner != '' && secrets.GITHUB_TOKEN != '' }} steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 # Determine Docker Tag - name: Init Variables @@ -34,7 +34,7 @@ jobs: # Login to Docker Hub - name: Login to Docker Hub - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -49,7 +49,7 @@ jobs: # Login to GitHub Container Registry - name: Login to GitHub Container Registry - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -64,7 +64,7 @@ jobs: | tee -a "${GITHUB_ENV}" - name: Build and push - uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 # v6.5.0 with: context: . push: true diff --git a/Dockerfile b/Dockerfile index 7731e93..aa98588 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1 + # Compile the web vault using docker # Usage: # Quick and easy: @@ -15,7 +17,7 @@ # Note: you can use --build-arg to specify the version to build: # docker build -t web_vault_build --build-arg VAULT_VERSION=main . -FROM node:18-bookworm as build +FROM node:18-bookworm AS build RUN node --version && npm --version # Prepare the folder to enable non-root, otherwise npm will refuse to run the postinstall