Skip to content

Merge pull request #1472 from cloud-pi-native/develop #153

Merge pull request #1472 from cloud-pi-native/develop

Merge pull request #1472 from cloud-pi-native/develop #153

Workflow file for this run

name: CD
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
NAMESPACE: "${{ github.repository }}"
BUILD_AMD64: true
BUILD_ARM64: true
USE_QEMU: false
NODE_VERSION: 22.10.0
PNPM_VERSION: 9.10.0
jobs:
expose-vars:
runs-on: ubuntu-latest
outputs:
REGISTRY: ${{ env.REGISTRY }}
NAMESPACE: ${{ env.NAMESPACE }}
BUILD_AMD64: ${{ env.BUILD_AMD64 }}
BUILD_ARM64: ${{ env.BUILD_ARM64 }}
USE_QEMU: ${{ env.USE_QEMU }}
NODE_VERSION: ${{ env.NODE_VERSION }}
PNPM_VERSION: ${{ env.PNPM_VERSION }}
steps:
- name: Exposing env vars
run: echo "Exposing env vars"
release:
uses: ./.github/workflows/release.yml
build-amd64:
uses: ./.github/workflows/build.yml
if: ${{ needs.release.outputs.release-created == 'true' }}
needs:
- expose-vars
- release
with:
REGISTRY: ${{ needs.expose-vars.outputs.REGISTRY }}
NAMESPACE: ${{ needs.expose-vars.outputs.NAMESPACE }}
TAG: ${{ needs.release.outputs.major-tag }}.${{ needs.release.outputs.minor-tag }}.${{ needs.release.outputs.patch-tag }}
MAJOR_TAG: ${{ needs.release.outputs.major-tag }}
MINOR_TAG: ${{ needs.release.outputs.minor-tag }}
PATCH_TAG: ${{ needs.release.outputs.patch-tag }}
BUILD_AMD64: ${{ needs.expose-vars.outputs.BUILD_AMD64 == 'true' }}
BUILD_ARM64: false
USE_QEMU: ${{ needs.expose-vars.outputs.USE_QEMU == 'true' }}
build-arm64:
uses: ./.github/workflows/build.yml
if: ${{ needs.release.outputs.release-created == 'true' }}
needs:
- expose-vars
- release
with:
REGISTRY: ${{ needs.expose-vars.outputs.REGISTRY }}
NAMESPACE: ${{ needs.expose-vars.outputs.NAMESPACE }}
TAG: ${{ needs.release.outputs.major-tag }}.${{ needs.release.outputs.minor-tag }}.${{ needs.release.outputs.patch-tag }}
MAJOR_TAG: ${{ needs.release.outputs.major-tag }}
MINOR_TAG: ${{ needs.release.outputs.minor-tag }}
PATCH_TAG: ${{ needs.release.outputs.patch-tag }}
BUILD_AMD64: false
BUILD_ARM64: ${{ needs.expose-vars.outputs.BUILD_ARM64 == 'true' }}
USE_QEMU: ${{ needs.expose-vars.outputs.USE_QEMU == 'true' }}
npm-publish:
uses: ./.github/workflows/npm.yml
if: ${{ needs.release.outputs.release-created == 'true' }}
needs:
- expose-vars
- release
with:
PNPM_VERSION: ${{ needs.expose-vars.outputs.PNPM_VERSION }}
NODE_VERSION: ${{ needs.expose-vars.outputs.NODE_VERSION }}
PUBLISH_APPS: false
PUBLISH_PACKAGES: true
PUBLISH_PLUGINS: true
CHECK_CHANGES: false
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
update-chart:
runs-on: ubuntu-latest
needs:
- expose-vars
- release
- build-amd64
steps:
- name: Trigger helm-charts update
env:
GH_TOKEN: ${{ secrets.HELM_CHART_TOKEN }}
run: |
gh workflow --repo cloud-pi-native/helm-charts run update-chart.yaml -f APP_VERSION=${{ needs.release.outputs.major-tag }}.${{ needs.release.outputs.minor-tag }}.${{ needs.release.outputs.patch-tag }} -f CHART_NAME=dso-console