Rename workflows #10
This file contains hidden or 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" | |
| 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/paths-filter@v3.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'backend/**' | |
| - '.github/workflows/backend*' | |
| frontend: | |
| - 'frontend/**' | |
| - '.github/workflows/frontend.yml' | |
| backend-lint: | |
| uses: ./.github/workflows/backend-lint.yml | |
| needs: | |
| - config | |
| with: | |
| python-version: ${{ needs.config.outputs.PYTHON_VERSION }} | |
| plone-version: ${{ needs.config.outputs.PLONE_VERSION }} | |
| if: ${{ needs.config.outputs.backend == 'true' }} | |
| backend-test: | |
| uses: ./.github/workflows/backend-test.yml | |
| needs: | |
| - config | |
| strategy: | |
| matrix: | |
| python-version: ["3.13", "3.12", "3.11", "3.10"] | |
| plone-version: ["6.1-latest", "6.0-latest"] | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| plone-version: ${{ matrix.plone-version }} | |
| if: ${{ needs.config.outputs.backend == 'true' }} | |
| backend-coverage: | |
| uses: ./.github/workflows/backend-coverage.yml | |
| needs: | |
| - config | |
| - backend-test | |
| with: | |
| python-version: ${{ needs.config.outputs.PYTHON_VERSION }} | |
| plone-version: ${{ needs.config.outputs.PLONE_VERSION }} | |
| if: ${{ needs.config.outputs.backend == 'true' }} | |
| backend-release: | |
| uses: ./.github/workflows/backend-release.yml | |
| needs: | |
| - config | |
| - backend-lint | |
| - backend-coverage | |
| with: | |
| base-tag: ${{ needs.config.outputs.BASE_TAG }} | |
| image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }} | |
| image-name-suffix: backend | |
| 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 |