Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Explicitly pass metadata to the build step (#14560)

Patryk Zawadzki80fb312f21c5
diff --git a/.github/workflows/publish-containers.yml b/.github/workflows/publish-containers.yml
index 0f893be374..f73007fa88 100644
--- a/.github/workflows/publish-containers.yml
+++ b/.github/workflows/publish-containers.yml
@@ -36,13 +36,13 @@ jobs:
type=pep440,pattern={{major}}.{{minor}}
- name: Set up QEMU
- uses: docker/setup-qemu-action@v1
+ uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
- uses: docker/setup-buildx-action@v1
+ uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
@@ -73,12 +73,10 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
context: ./
+ labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
- build-args: |
- DOCKER_METADATA_OUTPUT_JSON
- PROJECT_VERSION=${{ steps.meta.outputs.version }}
- COMMIT_ID=${{ github.sha }}
+ tags: ${{ steps.meta.outputs.tags }}
- name: Image digest
run: |
diff --git a/Dockerfile b/Dockerfile
index fd474c1d0a..8bdaeb14e8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -53,18 +53,12 @@ RUN SECRET_KEY=dummy STATIC_URL=${STATIC_URL} python3 manage.py collectstatic --
EXPOSE 8000
ENV PYTHONUNBUFFERED 1
-ARG COMMIT_ID
-ARG PROJECT_VERSION
-ENV PROJECT_VERSION="${PROJECT_VERSION}"
-
LABEL org.opencontainers.image.title="saleor/saleor" \
org.opencontainers.image.description="\
A modular, high performance, headless e-commerce platform built with Python, \
GraphQL, Django, and ReactJS." \
org.opencontainers.image.url="https://saleor.io/" \
org.opencontainers.image.source="https://github.com/saleor/saleor" \
- org.opencontainers.image.revision="$COMMIT_ID" \
- org.opencontainers.image.version="$PROJECT_VERSION" \
org.opencontainers.image.authors="Saleor Commerce (https://saleor.io)" \
org.opencontainers.image.licenses="BSD 3"