Skip to content

Package Incus UI

Package Incus UI #94

Workflow file for this run

name: Package Incus UI
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch: # Allows manual triggering
jobs:
build:
strategy:
matrix:
include:
- repo: "https://pkgs.zabbly.com/incus/stable"
artifact: "incus-ui-stable.tar.gz"
- repo: "https://pkgs.zabbly.com/incus/lts-6.0"
artifact: "incus-ui-lts.tar.gz"
runs-on: ubuntu-latest
steps:
- name: Add Zabbly repository key
run: |
sudo mkdir -p /etc/apt/keyrings/
sudo curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
- name: Add Zabbly repository
run: |
sudo sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: ${{ matrix.repo }}
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc
EOF'
- name: Update apt and download package
run: |
sudo apt-get update
# Create a temporary directory for our work
mkdir -p /tmp/incus-work
cd /tmp/incus-work
# Download the package without installing it
apt-get download incus-ui-canonical
- name: Extract package and create tarball
run: |
cd /tmp/incus-work
# Extract the .deb file
dpkg-deb -x *.deb ./extracted
# Create tarball of the /opt/incus/ui directory if it exists
if [ -d "./extracted/opt/incus/ui" ]; then
cd ./extracted/opt/incus
tar czf /tmp/incus-work/${{ matrix.artifact }} ui/
else
echo "Error: /opt/incus/ui directory not found in package"
exit 1
fi
- name: Get package version
id: get-version
run: |
cd /tmp/incus-work
VERSION=$(dpkg-deb -f *.deb Version | tr ':' '-')
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: /tmp/incus-work/${{ matrix.artifact }}
release:
needs: [build]
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: incus-ui-stable.tar.gz
- uses: actions/download-artifact@v3
with:
name: incus-ui-lts.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-stable.tar.gz
incus-ui-lts.tar.gz
repo_token: ${{ secrets.GITHUB_TOKEN }}