Browse Source

Replace preview tag with latest to be conform with docker best practice

new-http-api
itchymax 3 years ago
parent
commit
6074bf6bea
  1. 16
      .github/workflows/build-release-binary.yml
  2. 16
      .github/workflows/release-docker.yml

16
.github/workflows/build-release-binary.yml

@ -197,21 +197,33 @@ jobs:
- name: Build maker docker image
run: |
VERSION=${{ github.event.release.tag_name }}
if [ "$VERSION" = "preview" ]; then
VERSION=latest
fi
docker buildx build \
--push \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--label "org.opencontainers.image.source https://github.com/${{ github.repository }}" \
--tag ghcr.io/${{ github.repository }}/maker:${{ github.event.release.tag_name }} \
--tag ghcr.io/${{ github.repository }}/maker:${VERSION} \
--build-arg BINARY_PATH=maker \
.
- name: Build taker docker image
run: |
VERSION=${{ github.event.release.tag_name }}
if [ "$VERSION" = "preview" ]; then
VERSION=latest
fi
docker buildx build \
--push \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--label "org.opencontainers.image.source https://github.com/${{ github.repository }}" \
--tag ghcr.io/${{ github.repository }}/taker:${{ github.event.release.tag_name }} \
--tag ghcr.io/${{ github.repository }}/taker:${VERSION} \
--build-arg BINARY_PATH=taker \
.

16
.github/workflows/release-docker.yml

@ -58,22 +58,34 @@ jobs:
- name: Build maker docker image
run: |
VERSION=${{ github.event.inputs.release_tag }}
if [ "$VERSION" = "preview" ]; then
VERSION=latest
fi
docker buildx build \
--push \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--label "org.opencontainers.image.source https://github.com/${{ github.repository }}" \
--tag ghcr.io/${{ github.repository }}/maker:${{ github.event.inputs.release_tag }} \
--tag ghcr.io/${{ github.repository }}/maker:${VERSION} \
--build-arg BINARY_PATH=maker \
.
- name: Build taker docker image
run: |
VERSION=${{ github.event.release.tag_name }}
if [ "$VERSION" = "preview" ]; then
VERSION=latest
fi
docker buildx build \
--push \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--label "org.opencontainers.image.source https://github.com/${{ github.repository }}" \
--tag ghcr.io/${{ github.repository }}/taker:${{ github.event.inputs.release_tag }} \
--tag ghcr.io/${{ github.repository }}/taker:${VERSION} \
--build-arg BINARY_PATH=taker \
.

Loading…
Cancel
Save