-
Notifications
You must be signed in to change notification settings - Fork 38
44 lines (38 loc) · 1.24 KB
/
preview-build.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
43
44
name: Preview build
description: 'Build the preview with UI version number'
on:
workflow_dispatch:
inputs:
ui-version:
required: true
default: 'v5.11.0'
runs:
using: "composite"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Update Submodule
run: |
git submodule update --init --recursive
cd .veda/ui
git fetch --all
git checkout ${{ github.event.inputs.ui-version }}
cd -
git add .veda/ui
git commit -m "Update submodule to version ${{ github.event.inputs.ui-version }}"
- name: Push Changes
run: |
git checkout -b ${{ github.event.inputs.ui-version }}
git push origin ${{ github.event.inputs.ui-version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: "Update submodule to version ${{ github.event.inputs.ui-version }}"
body: "This PR updates the submodule to version `${{ github.event.inputs.ui-version }}`."
branch: ${{ github.event.inputs.ui-version }}