Skip to content

♻️ Refactor Code to support Chakra v3 #9

♻️ Refactor Code to support Chakra v3

♻️ Refactor Code to support Chakra v3 #9

Workflow file for this run

---
name: publish
on:
push:
tags:
- "*"
branches:
- "*"
env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
jobs:
build:
name: Build Container Image
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3.3.0
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3.2.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: image_name_generator
uses: ASzc/change-string-case-action@v6
with:
string: ${{ env.IMAGE_NAME }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: ${{ env.REGISTRY }}/${{ steps.image_name_generator.outputs.lowercase }}
- name: Build and push Docker image
id: build-and-push-release
uses: docker/build-push-action@v5.3.0
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: |
${{ env.REGISTRY }}/${{ steps.image_name_generator.outputs.lowercase }}:latest
${{ env.REGISTRY }}/${{ steps.image_name_generator.outputs.lowercase }}:${{ github.ref_name }}
deploy:
name: Deploy to parminpaas.ir
needs: build
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: tale/kubectl-action@v1
with:
base64-kube-config: ${{ secrets.KUBE_CONFIG }}
- uses: helmwave/setup-action@v0.2.0
name: Install helmwave
with:
version: "0.36.3"
- name: Templating helmwave.yml.tpl
working-directory: "./deployments/kubernetes"
run: "helmwave yml"
env:
CERT_MANAGER_CLUSTER_ISSUER: ${{ secrets.CERT_MANAGER_CLUSTER_ISSUER }}
DOMAIN: ${{ secrets.DOMAIN }}
INGRESS_CLASS: ${{ secrets.INGRESS_CLASS }}
VERSION: ${{ github.ref_name }}
- name: Plan
working-directory: "./deployments/kubernetes"
run: helmwave build
env:
CERT_MANAGER_CLUSTER_ISSUER: ${{ secrets.CERT_MANAGER_CLUSTER_ISSUER }}
DOMAIN: ${{ secrets.DOMAIN }}
INGRESS_CLASS: ${{ secrets.INGRESS_CLASS }}
VERSION: ${{ github.ref_name }}
- name: Deploy
working-directory: "./deployments/kubernetes"
run: helmwave up --kubedog --progress
env:
CERT_MANAGER_CLUSTER_ISSUER: ${{ secrets.CERT_MANAGER_CLUSTER_ISSUER }}
DOMAIN: ${{ secrets.DOMAIN }}
INGRESS_CLASS: ${{ secrets.INGRESS_CLASS }}
VERSION: ${{ github.ref_name }}