Skip to content

fix: use pointer everywhere when passing log chunk (#4943) #17

fix: use pointer everywhere when passing log chunk (#4943)

fix: use pointer everywhere when passing log chunk (#4943) #17

name: Release logs sidecar 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-sidecar.yml --snapshot
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
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-sidecar:${{ steps.github_sha.outputs.sha_short }}-arm64v8
docker push kubeshop/testkube-logs-sidecar:${{ steps.github_sha.outputs.sha_short }}-amd64
docker manifest create kubeshop/testkube-logs-sidecar:${{ steps.github_sha.outputs.sha_short }} --amend kubeshop/testkube-logs-sidecar:${{ steps.github_sha.outputs.sha_short }}-arm64v8 --amend kubeshop/testkube-logs-sidecar:${{ steps.github_sha.outputs.sha_short }}-amd64
docker manifest push -p kubeshop/testkube-logs-sidecar:${{ 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-sidecar
provider: dockerhub
short_description: "Testkube CLI Docker image"
readme_file: "./README.md"