Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview build action #502

Merged
merged 21 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Preview build with VEDA UI

on:
workflow_dispatch:
inputs:
VERSION_NUMBER:
type: string
repository_dispatch:
types: [update-version]

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 }}
fetch-depth: 0
- 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 || inputs.VERSION_NUMBER }}" >> $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 checkout ${{ env.VERSION }}
cd -
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Update UI to ${{ env.VERSION }}"
title: "ci: Update submodule to version ${{ env.VERSION }}"
body: "This is an automatic PR that updates the submodule to version `${{ env.VERSION }}`."
base: develop
branch: ci-update-${{ env.VERSION }}
Loading