From 89255f08c5d8f5cbd549c76a7518270365819c37 Mon Sep 17 00:00:00 2001 From: Marcus Jaschen Date: Sat, 4 May 2024 17:42:04 +0200 Subject: [PATCH] Task/select brouter version (#20) * checkout the given branch/tag when building (fallback=master) * pass version string in action * version is stored as variable in GitHub repository settings --- .github/workflows/ci.yml | 1 + Dockerfile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75182ef..1ab6a08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,3 +73,4 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: BROUTER_VERSION=${{ vars.BROUTER_VERSION }} diff --git a/Dockerfile b/Dockerfile index 83216df..be0a708 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,16 @@ FROM alpine/git as clone +ARG BROUTER_VERSION=master + WORKDIR /src RUN ["git", "clone", "https://github.com/abrensch/brouter.git"] WORKDIR /src/brouter +RUN git checkout "$BROUTER_VERSION" + RUN ["echo", "BRouter commit:"] RUN ["git", "log", "-n", "1", "--pretty=format:%H"]