Skip to content

Commit

Permalink
Revert "update"
Browse files Browse the repository at this point in the history
This reverts commit d191b60.
  • Loading branch information
renzholy committed Jul 4, 2021
1 parent d191b60 commit 7c4d3c2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: release

on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main
branches: [main]

jobs:
release:
Expand All @@ -27,6 +25,7 @@ jobs:
- name: Build and Push to Registries
uses: docker/build-push-action@v2
with:
file: ./Dockerfile.self
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.sha }}
Expand Down
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
FROM node:alpine AS deps
RUN apk add --no-cache libc6-compat
FROM ghcr.io/renzholy/blogit:latest
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

FROM node:alpine
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
ENV NODE_ENV=production
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
10 changes: 10 additions & 0 deletions Dockerfile.self
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:alpine AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

FROM node:alpine
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
6 changes: 2 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ branding:
icon: 'file-text'
color: 'yellow'
runs:
using: 'composite'
steps:
- run: $GITHUB_ACTION_PATH/entrypoint.sh
shell: bash
using: 'docker'
image: 'Dockerfile'
1 change: 0 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh

export NODE_ENV=production
export NEXT_PUBLIC_REF="${GITHUB_REF}"
export NEXT_PUBLIC_REPOSITORY="${GITHUB_REPOSITORY}"
cd /app
Expand Down

0 comments on commit 7c4d3c2

Please sign in to comment.