diff --git a/.github/workflows/publish_images.yml b/.github/workflows/publish_images.yml index e6387a35..63717276 100644 --- a/.github/workflows/publish_images.yml +++ b/.github/workflows/publish_images.yml @@ -78,12 +78,7 @@ jobs: echo "image_name=${{ matrix.target }}" >> $GITHUB_ENV fi - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: ${{ env.REGISTRY }}/${{ env.image_name }} - + # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. @@ -93,8 +88,7 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ env.image_name }}:latest build-args: | python_version=${{ matrix.python_version }} target=${{ matrix.target }} diff --git a/Dockerfile b/Dockerfile index d2add4ea..0db19548 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ FROM python:${python_version} as python FROM ${target} +# These need to be set here again, as the FROM directive resets the ARGs on use ARG python_version ARG target