Package Incus UI #10
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: 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 | |
tar -czvf incus-ui.tar.gz * | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: incus-ui.tar.gz | |
path: lxd-ui/build/ui/incus-ui.tar.gz | |
release: | |
needs: [build] | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: incus-ui.tar.gz | |
- name: release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
title: Latest git build | |
automatic_release_tag: latest | |
prerelease: true | |
draft: false | |
files: | | |
incus-ui.tar.gz | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |