Skip to content

feat: switch styling & configuration card enhancement (#800) #148

feat: switch styling & configuration card enhancement (#800)

feat: switch styling & configuration card enhancement (#800) #148

name: Publish Docker image with a commit hash tag
on:
push:
branches:
- develop
jobs:
push_to_registry:
name: Build and push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out GitHub repo
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Output commit sha
id: github_sha
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"
- name: Build image and push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
build-args: |
REACT_APP_VERSION=${{ steps.github_sha.outputs.sha_short }}
REACT_APP_GTM_ID=${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID }}
tags: ${{ github.repository }}:${{ steps.github_sha.outputs.sha_short }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.CI_BOT_TOKEN }}
repository: kubeshop/helm-charts
event-type: trigger-workflow-dashboard-develop
client-payload: '{"image_tag_dashboard": "${{ steps.github_sha.outputs.sha_short }}"}'