Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardozgz committed Apr 17, 2024
2 parents 9f5613d + aad603f commit 321e9af
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ jobs:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v3.3.0
with:
buildkitd-flags: --debug

- name: Log in to DockerHub Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to GitHub Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -40,7 +40,7 @@ jobs:
uses: martinbeentjes/npm-get-version-action@master

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5.3.0
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Install necessary dependencies to install the app's dependencies
FROM node:16-alpine as base_dependencies
FROM node:18-alpine as base_dependencies
RUN apk add --no-cache make gcc g++ python3 git
RUN npm install -g pnpm

# Ignore the app's version to avoid an unnecessary dependency install
FROM node:16-alpine as version_cache_fix
FROM node:18-alpine as version_cache_fix
WORKDIR /cache
COPY package*.json ./
# '3d' is the 3rd line of package*.json
Expand All @@ -24,14 +24,14 @@ COPY --from=version_cache_fix /cache /cache
RUN pnpm prune --prod

# compile the app using the cached dev dependencies
FROM node:16-alpine as builder
FROM node:18-alpine as builder
WORKDIR /app
COPY . .
COPY --from=app_building_dependencies /cache/node_modules ./node_modules
RUN npm run build

# copy the cached dependencies, copy the compiled code and set entrypoint
FROM node:16-alpine as release
FROM node:18-alpine as release
WORKDIR /app
COPY package*.json ./
COPY --from=app_production_dependencies /cache/node_modules ./node_modules
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine as node_modules_cache
FROM node:18-alpine as node_modules_cache

WORKDIR /cache/
RUN apk add --no-cache make gcc g++ python3 git
Expand All @@ -7,7 +7,7 @@ RUN npm install -g pnpm
RUN pnpm install --strict-peer-dependencies=false


FROM node:16-alpine
FROM node:18-alpine

WORKDIR /app
RUN apk add --no-cache git
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "member-counter-bot",
"version": "0.22.1",
"engines": {
"node": ">=16.0"
"node": ">=18.0"
},
"description": "",
"main": "./dist/src/index.js",
Expand Down

0 comments on commit 321e9af

Please sign in to comment.