Initial commit #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Brazilian Fields for Dexterity and Volto CI | ||
on: | ||
push: | ||
paths: | ||
- "backend/**" | ||
- "frontend/**" | ||
- ".github/workflows/backend.yml" | ||
- ".github/workflows/frontend.yml" | ||
- ".github/workflows/main.yml" | ||
- "devops/**" | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME_PREFIX: ghcr.io/plonegovbr/brfieldsandwidgets | ||
NODE_VERSION: "22.x" | ||
PYTHON_VERSION: "3.12" | ||
PLONE_VERSION: "6.1-latest" | ||
jobs: | ||
config: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
backend: ${{ steps.filter.outputs.backend }} | ||
frontend: ${{ steps.filter.outputs.frontend }} | ||
BASE_TAG: ${{ steps.vars.outputs.BASE_TAG }} | ||
IMAGE_NAME_PREFIX: ${{ env.IMAGE_NAME_PREFIX }} | ||
NODE_VERSION: ${{ env.NODE_VERSION }} | ||
PYTHON_VERSION: ${{ env.PYTHON_VERSION }} | ||
PLONE_VERSION: ${{ env.PLONE_VERSION }} | ||
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Compute several vars needed for the CI | ||
id: vars | ||
run: | | ||
echo 'BASE_TAG=sha-$(git rev-parse --short HEAD)' >> $GITHUB_OUTPUT | ||
python3 -c 'import json; data = json.load(open("./frontend/mrs.developer.json")); print("VOLTO_VERSION=" + (data["core"].get("tag") or "latest"))' >> $GITHUB_OUTPUT | ||
- name: Test vars | ||
run: | | ||
echo 'BASE_TAG=${{ steps.vars.outputs.BASE_TAG }}' | ||
echo 'VOLTO_VERSION=${{ steps.vars.outputs.VOLTO_VERSION }}' | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
backend: | ||
- 'backend/**' | ||
- '.github/workflows/backend.yml' | ||
frontend: | ||
- 'frontend/**' | ||
- '.github/workflows/frontend.yml' | ||
backend: | ||
uses: ./.github/workflows/backend.yml | ||
needs: | ||
- config | ||
strategy: | ||
matrix: | ||
python-version: ["3.13", "3.12", "3.11", "3.10"] | ||
plone-version: ["6.1-latest", "6.0-latest"] | ||
with: | ||
base-tag: ${{ needs.config.outputs.BASE_TAG }} | ||
Check failure on line 67 in .github/workflows/main.yml
|
||
python-version: ${{ matrix.python-version }} | ||
plone-version: ${{ matrix.plone-version }} | ||
if: ${{ needs.config.outputs.backend == 'true' }} | ||
backend-release: | ||
uses: ./.github/workflows/backend-release.yml | ||
needs: | ||
- config | ||
- backend | ||
with: | ||
image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }} | ||
image-name-suffix: backend | ||
python-version: ${{ needs.config.outputs.PYTHON_VERSION }} | ||
plone-version: ${{ needs.config.outputs.PLONE_VERSION }} | ||
if: ${{ needs.config.outputs.backend == 'true' }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
frontend: | ||
uses: ./.github/workflows/frontend.yml | ||
needs: | ||
- config | ||
with: | ||
base-tag: ${{ needs.config.outputs.BASE_TAG }} | ||
image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }} | ||
image-name-suffix: frontend | ||
node-version: ${{ needs.config.outputs.NODE_VERSION }} | ||
volto-version: ${{ needs.config.outputs.VOLTO_VERSION }} | ||
if: ${{ needs.config.outputs.frontend == 'true' }} | ||
permissions: | ||
contents: read | ||
packages: write |