Skip to content

Merge pull request #989 from cloud-pi-native/release-please--branches… #50

Merge pull request #989 from cloud-pi-native/release-please--branches…

Merge pull request #989 from cloud-pi-native/release-please--branches… #50

Workflow file for this run

name: CD
on:
push:
branches:
- main
env:
REGISTRY: "ghcr.io"
NAMESPACE: "${{ github.repository }}"
# TODO : remettre à true quand runner restaurés
MULTI_ARCH: false
USE_QEMU: false
NODE_VERSION: "20.11.0"
PNPM_VERSION: "8"
jobs:
expose-vars:
runs-on: ubuntu-latest
outputs:
REGISTRY: ${{ env.REGISTRY }}
NAMESPACE: ${{ env.NAMESPACE }}
MULTI_ARCH: ${{ env.MULTI_ARCH }}
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:
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 }}
MULTI_ARCH: ${{ needs.expose-vars.outputs.MULTI_ARCH == '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:
MAJOR_TAG: ${{ needs.release.outputs.major-tag }}
MINOR_TAG: ${{ needs.release.outputs.minor-tag }}
PATCH_TAG: ${{ needs.release.outputs.patch-tag }}
PNPM_VERSION: ${{ needs.expose-vars.outputs.PNPM_VERSION }}
NODE_VERSION: ${{ needs.expose-vars.outputs.NODE_VERSION }}