-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (39 loc) · 1.2 KB
/
mpl_head_version.yml
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
# This workflow reads the project.properties in the MPL submodule
# into the environment variables
# and then creates an output variable for `mplVersion`
name: MPL HEAD Version
on:
workflow_call:
inputs:
mpl-head:
description: "Using MPL HEAD?"
required: true
default: main
type: string
outputs:
version:
description: "The MPL version"
value: ${{ jobs.getMplHeadVersion.outputs.version }}
jobs:
getMplHeadVersion:
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.read_property.outputs.mplVersion }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Update MPL submodule locally if requested
working-directory: submodules/MaterialProviders
shell: bash
run: |
git checkout ${{inputs.mpl-head}}
git submodule update --init --recursive
git rev-parse HEAD
- name: Get the MPL version from the MPL submodule
id: read_property
uses: christian-draeger/[email protected]
with:
path: "submodules/MaterialProviders/project.properties"
properties: "mplVersion"