Skip to content

Build LXD-UI with Incus Patches #5

Build LXD-UI with Incus Patches

Build LXD-UI with Incus Patches #5

Workflow file for this run

name: Build LXD-UI with Incus Patches
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y git nodejs npm
- name: Checkout LXD-UI
uses: actions/checkout@v3
with:
repository: canonical/lxd-ui
path: lxd-ui
- name: Checkout Incus
uses: actions/checkout@v3
with:
repository: zabbly/incus
path: incus
- name: Apply Incus Patches
run: |
cd lxd-ui
for patch in ../incus/patches/ui-canonical-*.patch; do
git apply --reject --whitespace=fix $patch
done
sed -i -f "../incus/patches/ui-canonical-renames.sed" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts* src/*/*/*/*/*.ts*
- name: Install and Build LXD-UI
run: |
cd lxd-ui
npm install -g yarn
yarn install
yarn build
- name: Package Build
run: |
cd lxd-ui/build/ui
version=$(date +%Y%m%d)
tar -czvf lxd-ui-$version.tar.gz *
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version=$(date +%Y%m%d)
release_name="incus-ui-$version"
asset_name="lxd-ui-$version.tar.gz"
gh release create $release_name lxd-ui/build/ui/$asset_name
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: lxd-ui
path: lxd-ui/build/ui/lxd-ui-*.tar.gz