-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (104 loc) · 4 KB
/
config.yml
File metadata and controls
110 lines (104 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: "Compute Config variables"
on:
workflow_call:
inputs:
image-name-prefix:
required: false
type: string
default: "ghcr.io/collective/keycloak-and-plone"
node-version:
required: false
type: string
default: "22.x"
python-version:
required: false
type: string
default: "3.12"
outputs:
acceptance:
description: "Flag reporting if we should run the acceptance jobs"
value: ${{ jobs.config.outputs.acceptance }}
backend:
description: "Flag reporting if we should run the backend jobs"
value: ${{ jobs.config.outputs.backend }}
devops:
description: "Flag reporting if we should run the devops jobs"
value: ${{ jobs.config.outputs.devops }}
docs:
description: "Flag reporting if we should run the docs jobs"
value: ${{ jobs.config.outputs.docs }}
frontend:
description: "Flag reporting if we should run the frontend jobs"
value: ${{ jobs.config.outputs.frontend }}
base-tag:
description: "Base tag to be used when creating container images"
value: ${{ jobs.config.outputs.base-tag }}
image-name-prefix:
description: "Image name prefix for container images"
value: ${{ inputs.image-name-prefix }}
node-version:
description: "Node version to be used"
value: ${{ inputs.node-version }}
python-version:
description: "Python version to be used"
value: ${{ inputs.python-version }}
plone-version:
description: "Plone version to be used"
value: ${{ jobs.config.outputs.plone-version }}
volto-version:
description: "Volto version to be used"
value: ${{ jobs.config.outputs.volto-version }}
jobs:
config:
runs-on: ubuntu-latest
outputs:
acceptance: ${{ steps.filter.outputs.acceptance }}
backend: ${{ steps.filter.outputs.backend }}
devops: ${{ steps.filter.outputs.devops }}
docs: ${{ steps.filter.outputs.docs }}
frontend: ${{ steps.filter.outputs.frontend }}
base-tag: ${{ steps.vars.outputs.base-tag }}
plone-version: ${{ steps.vars.outputs.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
shell: bash
run: |
echo "base-tag=sha-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "plone-version=$(cat backend/version.txt)" >> $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
- uses: dorny/paths-filter@v3.0.2
id: filter
with:
filters: |
acceptance:
- '.github/workflows/backend*'
- '.github/workflows/frontend*'
- 'backend/**'
- 'frontend/**'
backend:
- 'backend/**'
- '.github/workflows/backend*'
devops:
- 'devops/**'
docs:
- '.readthedocs.yaml'
- 'docs/**'
- '.github/workflows/docs.yaml'
frontend:
- 'frontend/**'
- '.github/workflows/frontend*'
- name: Test vars
run: |
echo "base-tag: ${{ steps.vars.outputs.base-tag }}"
echo 'plone-version: ${{ steps.vars.outputs.plone-version }}'
echo 'volto-version: ${{ steps.vars.outputs.volto-version }}'
echo 'event-name: ${{ github.event_name }}'
echo 'Paths - acceptance: ${{ steps.filter.outputs.acceptance }}'
echo 'Paths - backend: ${{ steps.filter.outputs.backend }}'
echo 'Paths - devops: ${{ steps.filter.outputs.devops }}'
echo 'Paths - docs: ${{ steps.filter.outputs.docs }}'
echo 'Paths - frontend: ${{ steps.filter.outputs.frontend }}'