Preview build action #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview build with VEDA UI | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [update-version] | |
pull_request: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
makepr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
ref: ${{ github.event.client_payload.ref }} | |
- name: Use Node.js ${{ env.NODE }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE }} | |
- name: Set Version Variable | |
id: set-version | |
run: echo "VERSION=${{ github.event.client_payload.VERSION_NUMBER || 'v5.11.0' }}" >> $GITHUB_ENV | |
- name: git config | |
shell: bash | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Update Submodule | |
shell: bash | |
run: | | |
git submodule update --init --recursive | |
git submodule update --recursive --remote | |
cd ./.veda/ui | |
git fetch --tags | |
git tag | |
git checkout ${{ env.VERSION }} | |
cd - | |
git add .veda/ui | |
git commit -m "Update submodule to version ${{ env.VERSION }}" | |
- name: Push Changes | |
run: | | |
git checkout -b ${{ env.VERSION }} | |
git push origin ${{ env.VERSION }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: "Update UI to ${{ env.VERSION }}" | |
title: "Update submodule to version${{ env.VERSION }}" | |
body: "This PR updates the submodule to version `${{ env.VERSION }}`." | |
branch: update-to-${{ env.VERSION }} |