Skip to content

Commit

Permalink
ci: add node version and base debian image as args
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Jul 18, 2024
1 parent 603f1fc commit 8dbe03f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Build app
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
run: bash ./scripts/build_app.sh -p -r ${{ github.job }}
run: bash ./scripts/build_app.sh -p -r ${{ github.job }} -n 20 -d bookworm
10 changes: 10 additions & 0 deletions scripts/build_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
## Parse options
##

NODE_VER=20
DEBIAN_VER=bookworm
PUBLISH=false
CI_STEP_NAME="Build app"
while getopts "pr:" option; do
case $option in
d) # defines debian version
DEBIAN_VER=$OPTARG
;;
n) # defines node version
NODE_VER=$OPTARG
;;
p) # define to publish container to registry
PUBLISH=true
;;
Expand Down Expand Up @@ -63,6 +71,8 @@ DOCKER_BUILDKIT=1 docker build \
--build-arg APP="$APP" \
--build-arg FLAVOR="$FLAVOR" \
--build-arg BUILD_NUMBER="$(get_git_commit_short_sha "$ROOT_DIR")" \
--build-arg NODE_VERSION="$NODE_VER" \
--build-arg DEBIAN_VERSION="$DEBIAN_VER" \
-f app.Dockerfile \
-t "$IMAGE_NAME:$IMAGE_TAG" \
"$WORKSPACE_DIR"
Expand Down

0 comments on commit 8dbe03f

Please sign in to comment.