From d15751d37bf2a7d1e73c86a33eff8eba9f84383b Mon Sep 17 00:00:00 2001 From: Travis Shears Date: Mon, 23 Mar 2026 15:43:04 +0100 Subject: [PATCH] create custom docker image for fargo actions --- .github/test_image/Dockerfile | 3 +++ .github/test_image/build.sh | 16 ++++++++++++++++ .github/workflows/test.yml | 5 +---- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .github/test_image/Dockerfile create mode 100755 .github/test_image/build.sh diff --git a/.github/test_image/Dockerfile b/.github/test_image/Dockerfile new file mode 100644 index 0000000..76b94c8 --- /dev/null +++ b/.github/test_image/Dockerfile @@ -0,0 +1,3 @@ +FROM ghcr.io/gleam-lang/gleam:v1.15.2-erlang + +RUN apt-get update && apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/* diff --git a/.github/test_image/build.sh b/.github/test_image/build.sh new file mode 100755 index 0000000..1eaf441 --- /dev/null +++ b/.github/test_image/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +export AWS_PROFILE=personal +export AWS_REGION=eu-central-1 + +REPO_NAME="gleam-tester-homelabstack" + +if ! aws ecr describe-repositories --repository-names "$REPO_NAME" >/dev/null 2>&1; then + aws ecr create-repository --repository-name "$REPO_NAME" +fi + +docker buildx build --platform linux/amd64,linux/arm64 -t "853019563312.dkr.ecr.eu-central-1.amazonaws.com/${REPO_NAME}:latest" --push . + +echo "Docker image built and pushed to AWS ECR" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3612a84..6d7a729 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,11 +10,8 @@ jobs: name: Run Tests runs-on: docker container: - image: ghcr.io/gleam-lang/gleam:v1.15.2-erlang + image: 853019563312.dkr.ecr.eu-central-1.amazonaws.com/gleam-tester-homelabstack:latest steps: - - name: Install Node.js - run: apt-get update && apt-get install -y nodejs npm - - name: Checkout code uses: actions/checkout@v4