Skip to content

Commit

Permalink
test cli image
Browse files Browse the repository at this point in the history
  • Loading branch information
ypoplavs committed Jan 17, 2024
1 parent 110290b commit b28e720
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
10 changes: 0 additions & 10 deletions .builds-linux.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ dockers:
- "--cache-from={{ .Env.DOCKER_BUILDX_CACHE_FROM }}"
- "--build-arg=ALPINE_IMAGE={{ .Env.ALPINE_IMAGE }}"

docker_manifests:
- name_template: kubeshop/testkube-cli:{{ .Env.DOCKER_IMAGE_TAG }}
image_templates:
- kubeshop/testkube-cli:{{ .Env.DOCKER_IMAGE_TAG }}-amd64
- kubeshop/testkube-cli:{{ .Env.DOCKER_IMAGE_TAG }}-arm64v8
- name_template: kubeshop/testkube-cli:latest
image_templates:
- kubeshop/testkube-cli:{{ .Env.DOCKER_IMAGE_TAG }}-amd64
- kubeshop/testkube-cli:{{ .Env.DOCKER_IMAGE_TAG }}-arm64v8

docker_signs:
- cmd: cosign
artifacts: all
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/release-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ jobs:
id: github_sha
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"

- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand All @@ -82,13 +88,20 @@ jobs:
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
DOCKER_IMAGE_TAG: ${{ steps.github_sha.outputs.sha_short }}
DOCKER_IMAGE_TAG: ${{steps.tag.outputs.tag}}

- name: Push Docker images
if: matrix.name == 'linux'
run: |
docker push kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-arm64v8
docker push kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-amd64
docker push kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-arm64v8
docker push kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-amd64
# adding the docker manifest for the latest image tag
docker manifest create kubeshop/testkube-cli:latest --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-amd64 --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-arm64v8
docker manifest push -p kubeshop/testkube-cli:latest
docker manifest create kubeshop/testkube-cli:${{steps.tag.outputs.tag}} --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-amd64 --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-arm64v8
docker manifest push -p kubeshop/testkube-cli:${{steps.tag.outputs.tag}}
- name: Push README to Dockerhub
if: matrix.name == 'linux'
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,14 @@ jobs:
id: github_sha
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"

- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
Expand All @@ -83,20 +89,20 @@ jobs:
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
DOCKER_IMAGE_TAG: ${{ steps.github_sha.outputs.sha_short }}
DOCKER_IMAGE_TAG: ${{steps.tag.outputs.tag}}

- name: Push Docker images
if: matrix.name == 'linux'
run: |
docker push kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-arm64v8
docker push kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-amd64
docker push kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-arm64v8
docker push kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-amd64
# adding the docker manifest for the latest image tag
docker manifest create kubeshop/testkube-cli:latest \
kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-amd64 \
kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-arm64v8
docker manifest annotate kubeshop/testkube-cli:latest kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-amd64 --arch amd64
docker manifest annotate kubeshop/testkube-cli:latest kubeshop/testkube-cli:${{ steps.github_sha.outputs.sha_short }}-arm64v8 --arch arm64 --variant v8
docker manifest push kubeshop/testkube-cli:latest
docker manifest create kubeshop/testkube-cli:latest --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-amd64 --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-arm64v8
docker manifest push -p kubeshop/testkube-cli:latest
docker manifest create kubeshop/testkube-cli:${{steps.tag.outputs.tag}} --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-amd64 --amend kubeshop/testkube-cli:${{steps.tag.outputs.tag}}-arm64v8
docker manifest push -p kubeshop/testkube-cli:${{steps.tag.outputs.tag}}
- name: Upload Artifacts
uses: actions/upload-artifact@master
Expand Down

0 comments on commit b28e720

Please sign in to comment.