feat: logs v2 (#1027) #44
Workflow file for this run
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: Publish Docker image | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build_multi_platform_images: | |
name: Build and push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: "arm64" | |
path: arm64v8/nginx:alpine | |
- name: "amd64" | |
path: nginx:alpine | |
steps: | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
with: | |
strip_v: true | |
- name: Check out GitHub repo | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: | | |
image=moby/buildkit:v0.10.6 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- 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: ${{ github.repository }} | |
provider: dockerhub | |
short_description: 'Testkube Kubernetes Dashboard' | |
readme_file: './README.md' | |
- name: Build image and push to Docker Hub | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
build-args: | | |
TARGET=${{ matrix.path }} | |
REACT_APP_VERSION=${{ steps.tag.outputs.tag }} | |
REACT_APP_GTM_ID=${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID }} | |
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | |
platforms: ${{ matrix.name }} | |
tags: ${{ github.repository }}:${{steps.tag.outputs.tag}}-${{ matrix.name }} | |
cache-from: type=gha,scope=${{ matrix.name }} | |
cache-to: type=gha,mode=max,scope=${{ matrix.name }} | |
create_manifest: | |
needs: build_multi_platform_images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
with: | |
strip_v: true | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create Docker manifest and push multi-arch image to Registry | |
run: | | |
docker manifest create ${{ github.repository }}:${{steps.tag.outputs.tag}} --amend ${{ github.repository }}:${{steps.tag.outputs.tag}}-arm64 --amend ${{ github.repository }}:${{steps.tag.outputs.tag}}-amd64 | |
docker manifest push -p ${{ github.repository }}:${{steps.tag.outputs.tag}} | |
docker manifest create ${{ github.repository }}:latest --amend ${{ github.repository }}:${{steps.tag.outputs.tag}}-arm64 --amend ${{ github.repository }}:${{steps.tag.outputs.tag}}-amd64 | |
docker manifest push -p ${{ github.repository }}:latest | |
releasing_helm_chart_dashboard: | |
needs: create_manifest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
with: | |
strip_v: true | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.CI_BOT_TOKEN }} | |
repository: kubeshop/testkube-dashboard-chart | |
event-type: trigger-workflow-dashboard-chart | |
client-payload: '{"app_version": "${{ steps.tag.outputs.tag }}"}' |