Skip to content

Commit

Permalink
Use dispatch event
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Dec 9, 2024
1 parent ac8e0d8 commit 385fbcc
Showing 1 changed file with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Preview build with VEDA UI

inputs:
ui-version:
required: true
default: 'v5.11.0'
on:
repository_dispatch:
types: [update-version]

permissions:
contents: write
pull-requests: write

runs:
using: "composite"
steps:
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: git config
shell: bash
run: |
Expand All @@ -30,23 +31,23 @@ runs:
shell: bash
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
ls
cd ./.veda/ui
git fetch --all
git checkout ${{ github.event.inputs.ui-version }}
git checkout ${{ github.event.client_payload.VERSION_NUMBER }}
cd -
git add .veda/ui
git commit -m "Update submodule to version ${{ github.event.inputs.ui-version }}"
git commit -m "Update submodule to version ${{ github.event.client_payload.VERSION_NUMBER }}"
- name: Push Changes
shell: bash
run: |
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@v7
with:
commit-message: "Update UI to ${{ github.event.inputs.ui-version }}"
title: "Update submodule to version ${{ github.event.inputs.ui-version }}"
body: "This PR updates the submodule to version `${{ github.event.inputs.ui-version }}`."
branch: update-${{ github.event.inputs.ui-version }}
commit-message: "Update UI to ${{ github.event.client_payload.VERSION_NUMBER }}"
title: "Update submodule to version ${{ github.event.client_payload.VERSION_NUMBER }}"
body: "This PR updates the submodule to version `${{ github.event.client_payload.VERSION_NUMBER }}`."
branch: update-to-${{ github.event.client_payload.VERSION_NUMBER }}

0 comments on commit 385fbcc

Please sign in to comment.