feat: TestWorkflow tests updated after testworkflows.testkube.io/v1
…
#145
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release logs server dev | |
on: | |
push: | |
branches: | |
- develop | |
permissions: | |
id-token: write | |
contents: write | |
env: | |
ALPINE_IMAGE: alpine:3.18.0 | |
jobs: | |
pre_build: | |
name: Pre-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Go Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get github sha | |
id: github_sha | |
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser-pro | |
version: latest | |
args: release -f ./goreleaser_files/.goreleaser-docker-build-logs-server.yml --snapshot | |
env: | |
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | |
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | |
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" | |
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 }} | |
- name: Push Docker images | |
run: | | |
docker push kubeshop/testkube-logs-server:${{ steps.github_sha.outputs.sha_short }}-arm64v8 | |
docker push kubeshop/testkube-logs-server:${{ steps.github_sha.outputs.sha_short }}-amd64 | |
docker manifest create kubeshop/testkube-logs-server:${{ steps.github_sha.outputs.sha_short }} --amend kubeshop/testkube-logs-server:${{ steps.github_sha.outputs.sha_short }}-arm64v8 --amend kubeshop/testkube-logs-server:${{ steps.github_sha.outputs.sha_short }}-amd64 | |
docker manifest push -p kubeshop/testkube-logs-server:${{ steps.github_sha.outputs.sha_short }} | |
- name: Push README to Dockerhub | |
uses: christian-korneck/update-container-description-action@v1 | |
env: | |
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }} | |
with: | |
destination_container_repo: kubeshop/testkube-logs-server | |
provider: dockerhub | |
short_description: "Testkube CLI Docker image" | |
readme_file: "./README.md" |