1
0
mirror of https://github.com/pypa/gh-action-pypi-publish synced 2024-11-30 21:22:28 +08:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Brendon Smith
0c8d90ee6d
Merge 8a35517545 into 15c56dba36 2024-11-12 03:43:20 +00:00

View File

@ -32,18 +32,15 @@ jobs:
IMAGE="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG}" IMAGE="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG}"
IMAGE_MAJOR="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG_MAJOR}" IMAGE_MAJOR="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG_MAJOR}"
IMAGE_MAJOR_MINOR="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG_MAJOR_MINOR}" IMAGE_MAJOR_MINOR="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG_MAJOR_MINOR}"
IMAGE_SHA="ghcr.io/$GITHUB_REPOSITORY:${GITHUB_SHA}"
echo "IMAGE=$IMAGE" >>"$GITHUB_ENV" echo "IMAGE=$IMAGE" >>"$GITHUB_ENV"
echo "IMAGE_MAJOR=$IMAGE_MAJOR" >>"$GITHUB_ENV" echo "IMAGE_MAJOR=$IMAGE_MAJOR" >>"$GITHUB_ENV"
echo "IMAGE_MAJOR_MINOR=$IMAGE_MAJOR_MINOR" >>"$GITHUB_ENV" echo "IMAGE_MAJOR_MINOR=$IMAGE_MAJOR_MINOR" >>"$GITHUB_ENV"
echo "IMAGE_SHA=$IMAGE_SHA" >>"$GITHUB_ENV"
docker build . \ docker build . \
--build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from $IMAGE \ --cache-from $IMAGE \
--tag $IMAGE --tag $IMAGE
docker tag $IMAGE $IMAGE_MAJOR docker tag $IMAGE $IMAGE_MAJOR
docker tag $IMAGE $IMAGE_MAJOR_MINOR docker tag $IMAGE $IMAGE_MAJOR_MINOR
docker tag $IMAGE $IMAGE_SHA
env: env:
DOCKER_TAG: ${{ inputs.tag || github.ref_name }} DOCKER_TAG: ${{ inputs.tag || github.ref_name }}
- name: Log in to GHCR - name: Log in to GHCR
@ -55,4 +52,3 @@ jobs:
docker push $IMAGE docker push $IMAGE
docker push $IMAGE_MAJOR docker push $IMAGE_MAJOR
docker push $IMAGE_MAJOR_MINOR docker push $IMAGE_MAJOR_MINOR
docker push $IMAGE_SHA