Skip to content

add deploy chart

add deploy chart #9

Workflow file for this run

name: Build and Push Docker Image with Buildx and Push Helm Chart
on:
push:
branches:
- master
- dev
tags:
- '*'
workflow_dispatch:
jobs:
docker:
runs-on: ${{ vars.RUNNER_SCALE_SET }}
steps:
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKER_REGISTRY }}
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ vars.DOCKER_REGISTRY }}/${{ vars.DOCKER_PROJECT }}/${{ vars.DOCKER_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha,format=long,prefix=
type=sha,prefix=
charts: |
type=semver,pattern={{version}}
- name: Build and Push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
helm:
if: github.ref_type == 'tag'
runs-on: ${{ vars.RUNNER_SCALE_SET }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=semver,pattern={{version}}
flavor: |
latest=false
- name: Install Helm
uses: azure/[email protected]
- name: Push Helm Chart
uses: appany/[email protected]
with:
name: ${{ vars.DOCKER_IMAGE }}
repository: charts
tag: ${{ steps.meta.outputs.tags }}
path: deploy/chart
registry: ${{ vars.DOCKER_REGISTRY }}
registry_username: ${{ vars.DOCKER_USERNAME }}
registry_password: ${{ secrets.DOCKER_PASSWORD }}