From f0e3598c0c16e669bfeb63e5c165e481ec60b90b Mon Sep 17 00:00:00 2001 From: Adrian Wannenmacher Date: Wed, 6 Dec 2023 15:51:50 +0100 Subject: [PATCH] pass sqlx version into dockerfile --- .github/workflows/sqlx.yml | 4 ++-- sqlx/Dockerfile | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml index 6de6eaa..2f53ced 100644 --- a/.github/workflows/sqlx.yml +++ b/.github/workflows/sqlx.yml @@ -39,7 +39,6 @@ jobs: type=semver,pattern={{version}},value=v${{ env.VERSION }} type=semver,pattern={{major}}.{{minor}},value=v${{ env.VERSION }} type=semver,pattern={{major}}=v${{ env.VERSION }} - type=raw,value=latest,enable={{is_default_branch}} - name: Build and Push uses: docker/build-push-action@v4 @@ -48,4 +47,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - + build-args: | + VERSION=${{ env.VERSION }} diff --git a/sqlx/Dockerfile b/sqlx/Dockerfile index 6b8ae60..3e38a15 100644 --- a/sqlx/Dockerfile +++ b/sqlx/Dockerfile @@ -1,5 +1,7 @@ FROM rust:alpine as build RUN apk add musl-dev + +ARG VERSION RUN cargo install sqlx-cli \ --version $VERSION \ --no-default-features \