Skip to content

Commit

Permalink
let Phoenix version and NodeJS versions be build arguments, only run …
Browse files Browse the repository at this point in the history
…GH action on tags
  • Loading branch information
nicbet committed Nov 25, 2021
1 parent 6d37240 commit 5685d6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Build nicbet/phoenix

on:
push:
branches: master

branches:
- "!*"
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
FROM elixir:1.12.3

# Build Args
ARG PHOENIX_VERSION=1.6.2
ARG NODEJS_VERSION=16.x

# Apt
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y apt-utils
RUN apt-get install -y build-essential
RUN apt-get install -y inotify-tools

# Nodejs
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
RUN curl -sL https://deb.nodesource.com/setup_${NODEJS_VERSION} | bash
RUN apt-get install -y nodejs

# Phoenix
RUN mix local.hex --force
RUN mix archive.install --force hex phx_new 1.6.2
RUN mix archive.install --force hex phx_new #{PHOENIX_VERSION}
RUN mix local.rebar --force

# App Directory
Expand Down

0 comments on commit 5685d6e

Please sign in to comment.