Skip to content

Commit

Permalink
Fix release II
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed May 3, 2024
1 parent bc2a565 commit 478641d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/backend-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ on:
workflow_dispatch:

jobs:
meta:
runs-on: ubuntu-latest
outputs:
TAG: ${{ steps.vars.outputs.TAG }}
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }}
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Env Vars
id: vars
run: |
echo "TAG=$(cat version.txt)" >> $GITHUB_OUTPUT
python3 -c 'import json; data = json.load(open("frontend/package.json")); print("VOLTO_VERSION=" + data["dependencies"]["@plone/volto"])' >> $GITHUB_OUTPUT
echo "PLONE_VERSION=$(cat backend/version.txt)" >> $GITHUB_OUTPUT
- name: Test vars
run: |
echo "TAG=${{ steps.vars.outputs.TAG }}"
echo "VOLTO_VERSION=${{ steps.vars.outputs.VOLTO_VERSION }}"
echo "PLONE_VERSION=${{ steps.vars.outputs.PLONE_VERSION }}"
black:
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -94,7 +116,7 @@ jobs:
pytest src/plonede/tests
release:
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/fixrelease' }}
runs-on: ubuntu-latest
needs: [black, flake8, isort, zpretty, tests]

Expand Down Expand Up @@ -131,6 +153,8 @@ jobs:
platforms: linux/amd64
context: backend
file: backend/Dockerfile
build-args: |
PLONE_VERSION=${{ needs.meta.outputs.PLONE_VERSION }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/frontend-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ defaults:
working-directory: ./frontend

jobs:
meta:
runs-on: ubuntu-latest
outputs:
TAG: ${{ steps.vars.outputs.TAG }}
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }}
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Env Vars
id: vars
run: |
echo "TAG=$(cat version.txt)" >> $GITHUB_OUTPUT
python3 -c 'import json; data = json.load(open("frontend/package.json")); print("VOLTO_VERSION=" + data["dependencies"]["@plone/volto"])' >> $GITHUB_OUTPUT
echo "PLONE_VERSION=$(cat backend/version.txt)" >> $GITHUB_OUTPUT
- name: Test vars
run: |
echo "TAG=${{ steps.vars.outputs.TAG }}"
echo "VOLTO_VERSION=${{ steps.vars.outputs.VOLTO_VERSION }}"
echo "PLONE_VERSION=${{ steps.vars.outputs.PLONE_VERSION }}"
eslint:
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,9 +108,9 @@ jobs:
run: make test

release:
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/fixrelease' }}
runs-on: ubuntu-latest
needs: [eslint, prettier, i18n, unit]
needs: [meta, eslint, prettier, i18n, unit]

steps:
- name: Checkout
Expand Down Expand Up @@ -123,6 +145,8 @@ jobs:
platforms: linux/amd64
context: frontend/
file: frontend/Dockerfile
build-args: |
VOLTO_VERSION=${{ needs.meta.outputs.VOLTO_VERSION }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: $${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit 478641d

Please sign in to comment.