diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml new file mode 100644 index 000000000..478adedc6 --- /dev/null +++ b/.github/workflows/preview-build.yml @@ -0,0 +1,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 }} \ No newline at end of file