Skip to content

Commit

Permalink
Set label manually
Browse files Browse the repository at this point in the history
  • Loading branch information
cgerum committed Aug 23, 2024
1 parent 22c2680 commit 222eadd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/publish_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 222eadd

Please sign in to comment.