Skip to content

Commit 55022fa

Browse files
authored
Merge pull request #52 from brunojppb/elixir-1.15.3-otp-26
Elixir 1.15.4 and OTP 26
2 parents 36a2799 + cc8755f commit 55022fa

File tree

7 files changed

+45
-31
lines changed

7 files changed

+45
-31
lines changed

.github/workflows/checks.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,22 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v2
2727

28+
- name: Read tooling version from .tool-versions
29+
id: tool-versions
30+
run: |
31+
ERLANG_VERSION_FROM_FILE=$(awk 'NR==1{print $2}' .tool-versions)
32+
ELIXIR_VERSION_FROM_FILE=$(awk 'NR==2' .tool-versions | awk 'NR==1{print $2}')
33+
echo "Erlang version: ${ERLANG_VERSION_FROM_FILE}"
34+
echo "Elixir version: ${ELIXIR_VERSION_FROM_FILE}"
35+
echo "erlang=$ERLANG_VERSION_FROM_FILE" >> "$GITHUB_OUTPUT"
36+
echo "elixir=$ELIXIR_VERSION_FROM_FILE" >> "$GITHUB_OUTPUT"
37+
2838
- name: Setup Elixir
2939
uses: erlef/setup-beam@v1
3040
id: beam
3141
with:
32-
otp-version: "25.2.3"
33-
elixir-version: "1.15.0"
42+
otp-version: ${{ steps.tool-versions.outputs.erlang }}
43+
elixir-version: ${{ steps.tool-versions.outputs.elixir }}
3444

3545
- name: Fetch cached dependencies
3646
uses: actions/cache@v3

.github/workflows/docker.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v3
1616

17-
- name: Read app version
18-
id: app-version
17+
- name: Read Tools and App version
18+
id: tool-versions
1919
run: |
20+
ERLANG_VERSION_FROM_FILE=$(awk 'NR==1{print $2}' .tool-versions)
21+
ELIXIR_VERSION_FROM_FILE=$(awk 'NR==2' .tool-versions | awk 'NR==1{print $2}')
2022
APP_VERSION_FROM_MIX=$(grep "version: " mix.exs | grep -o "[0-9.]*")
23+
echo "Erlang version: ${ERLANG_VERSION_FROM_FILE}"
24+
echo "Elixir version: ${ELIXIR_VERSION_FROM_FILE}"
2125
echo "App version from mix: ${APP_VERSION_FROM_MIX}"
22-
echo "APP_VERSION=$APP_VERSION_FROM_MIX" >> "$GITHUB_OUTPUT"
26+
echo "erlang=$ERLANG_VERSION_FROM_FILE" >> "$GITHUB_OUTPUT"
27+
echo "elixir=$ELIXIR_VERSION_FROM_FILE" >> "$GITHUB_OUTPUT"
28+
echo "app=$APP_VERSION_FROM_MIX" >> "$GITHUB_OUTPUT"
2329
2430
- name: Set up QEMU
2531
uses: docker/setup-qemu-action@v2
@@ -42,7 +48,10 @@ jobs:
4248
# platforms: "linux/amd64,linux/arm64"
4349
platforms: "linux/amd64"
4450
push: ${{ github.event_name != 'pull_request' }}
45-
tags: "brunojppb/turbo-racer:latest,brunojppb/turbo-racer:${{ steps.app-version.outputs.APP_VERSION }}"
51+
build-args: |
52+
ELIXIR_VERSION=${{ steps.tool-versions.outputs.elixir }}
53+
OTP_VERSION=${{ steps.tool-versions.outputs.erlang }}
54+
tags: "brunojppb/turbo-racer:latest,brunojppb/turbo-racer:${{ steps.tool-versions.outputs.app }}"
4655
cache-from: type=registry,ref=brunojppb/turbo-racer:latest
4756
cache-to: type=inline
4857

@@ -55,9 +64,9 @@ jobs:
5564

5665
- name: push to Github Container Registry
5766
run: |
58-
docker pull brunojppb/turbo-racer:${{ steps.app-version.outputs.APP_VERSION }}
67+
docker pull brunojppb/turbo-racer:${{ steps.tool-versions.outputs.app }}
5968
docker pull brunojppb/turbo-racer:latest
60-
docker tag brunojppb/turbo-racer:${{ steps.app-version.outputs.APP_VERSION }} ghcr.io/brunojppb/turbo-racer:${{ steps.app-version.outputs.APP_VERSION }}
69+
docker tag brunojppb/turbo-racer:${{ steps.tool-versions.outputs.app }} ghcr.io/brunojppb/turbo-racer:${{ steps.tool-versions.outputs.app }}
6170
docker tag brunojppb/turbo-racer:latest ghcr.io/brunojppb/turbo-racer:latest
6271
docker push ghcr.io/brunojppb/turbo-racer:latest
63-
docker push ghcr.io/brunojppb/turbo-racer:${{ steps.app-version.outputs.APP_VERSION }}
72+
docker push ghcr.io/brunojppb/turbo-racer:${{ steps.tool-versions.outputs.app }}

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
erlang 25.2.3
2-
elixir 1.15.0
1+
erlang 26.0.2
2+
elixir 1.15.4

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image
1111
# - https://hub.docker.com/_/ubuntu?tab=tags&page=1&name=xenial-20210804 - for the release image
1212
# - https://pkgs.org/ - resource for finding needed packages
13-
# - Ex: hexpm/elixir:1.14.0-erlang-25.0.4-ubuntu-xenial-20210804
13+
# - Ex: hexpm/elixir:1.15.4-erlang-26.0.2-ubuntu-jammy-20230126
1414
#
15-
ARG ELIXIR_VERSION=1.15.0
16-
ARG OTP_VERSION=25.3
15+
ARG ELIXIR_VERSION
16+
ARG OTP_VERSION
1717
ARG UBUNTU_VERSION=jammy-20230126
1818

1919
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-ubuntu-${UBUNTU_VERSION}"

config/test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ config :turbo, Turbo.Mailer, adapter: Swoosh.Adapters.Test
3030
config :turbo, Oban, testing: :inline
3131

3232
# Print only warnings and errors during test
33-
config :logger, level: :warn
33+
config :logger, level: :warning
3434

3535
# Initialize plugs at runtime for faster test compilation
3636
config :phoenix, :plug_init_mode, :runtime

mix.exs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Turbo.MixProject do
55
[
66
app: :turbo,
77
name: "Turbo Racer",
8-
version: "1.5.0",
8+
version: "1.5.1",
99
elixir: "~> 1.15",
1010
elixirc_paths: elixirc_paths(Mix.env()),
1111
compilers: Mix.compilers(),
@@ -41,7 +41,7 @@ defmodule Turbo.MixProject do
4141
{:bcrypt_elixir, "~> 3.0"},
4242
{:phoenix, "~> 1.7.2"},
4343
{:phoenix_ecto, "~> 4.4"},
44-
{:ecto_sql, "~> 3.10.1"},
44+
{:ecto_sql, "~> 3.10"},
4545
{:ex_aws, "~> 2.4"},
4646
{:ex_aws_s3, "~> 2.4"},
4747
{:sweet_xml, "~> 0.7"},
@@ -58,11 +58,6 @@ defmodule Turbo.MixProject do
5858
{:jason, "~> 1.4"},
5959
{:plug_cowboy, "~> 2.6"},
6060
{:oban, "~> 2.15"},
61-
# Temporary override so ssl_verify_fun works with Elixir 1.15
62-
# this is a dependency of hackney that needs this patch.
63-
# See: https://elixirforum.com/t/ssl-verify-fun-cert-helpers-erl/56310/7?u=bpaulino0
64-
{:ssl_verify_fun, "~> 1.1", manager: :rebar3, override: true},
65-
6661
# Dev dependencies
6762
{:dialyxir, "~> 1.2", only: [:dev], runtime: false},
6863
{:esbuild, "~> 0.4", runtime: Mix.env() == :dev},

0 commit comments

Comments
 (0)