Skip to content

Commit

Permalink
add build args
Browse files Browse the repository at this point in the history
  • Loading branch information
JangAyeon committed Apr 14, 2024
1 parent 1686ee7 commit 65f3b66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
build-args: |
"DISCORD_TOKEN=${{secrets.DISCORD_TOKEN}}"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## set base image
FROM node:20-alpine

# ⭐ 'ARG' 예약어를 통해 인자로 전달 받아야 한다.
ARG DISCORD_TOKEN
ENV DISCORD_TOKEN=${DISCORD_TOKEN}

## set working directory
WORKDIR /usr/src/app
Expand Down

0 comments on commit 65f3b66

Please sign in to comment.