diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index bad5ee8..5def554 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -2,8 +2,10 @@ name: Build nicbet/phoenix on: push: - branches: master - + branches: + - "!*" + tags: + - "v*" jobs: build: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 43ccf05..312419e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ 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 @@ -7,12 +11,12 @@ 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