Skip to content

Commit

Permalink
Add apt update in the homarr workflow
Browse files Browse the repository at this point in the history
create an output directory in / instead of $HOME

fix directory deep creation
  • Loading branch information
Soubinan committed Mar 5, 2024
1 parent a43833b commit fd4ecbe
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build-homarr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install Distrobuilder
- name: Install Distrobuilder and tools
run: |
sudo apt-get install -y debootstrap squashfs-tools jq
sudo apt-get update -y
sudo apt-get install -y debootstrap squashfs-tools jq wget
sudo snap install distrobuilder --classic
mkdir $HOME/output/$APP_NAME
mkdir /tmp/cache/$APP_NAME
curl --location --remote-name --url "$(curl -s https://api.github.com/repos/Orange-OpenSource/hurl/releases/latest |jq -r '.assets[] | select(.name|test("amd64.deb")) | .browser_download_url')" -o /tmp/hurl_amd64.deb
mkdir -p $HOME/output/$APP_NAME
mkdir -p /tmp/cache/$APP_NAME
wget $(curl -s https://api.github.com/repos/Orange-OpenSource/hurl/releases/latest |jq -r '.assets[] | select(.name|test("amd64.deb")) | .browser_download_url') -O /tmp/hurl_amd64.deb
sudo apt-get install -y /tmp/hurl_amd64.deb
- name: Get application version
run: |
echo "APP_VERSION="$(curl -s $PROJECT_SOURCE/master/package.json | jq -r ".version") >> $GITHUB_ENV
echo "APP_VERSION=$(curl -s https://raw.githubusercontent.com/ajnart/homarr/master/package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Check out repository code
- name: Check out repository
uses: actions/checkout@v4

- name: Build Image
if: github.event_name == 'pull_request'
run: |
sudo distrobuilder --cache-dir /tmp/cache/$APP_NAME build-lxc ${{ github.workspace }}/templates/${APP_NAME}.yml -o image.distribution=${{ matrix.distribution }} -o image.architecture=${{ matrix.architecture }} -o image.release=${{ matrix.release }} -o image.serial=$APP_VERSION -o source.url="http://ftp.us.debian.org/debian" $HOME/output/$APP_NAME/
sudo distrobuilder --cache-dir /tmp/cache/$APP_NAME build-lxc ${{ github.workspace }}/templates/${APP_NAME}.yml -o image.distribution=${{ matrix.distribution }} -o image.architecture=${{ matrix.architecture }} -o image.release=${{ matrix.release }} -o image.serial="v${APP_VERSION}" -o source.url="http://ftp.us.debian.org/debian" $HOME/output/$APP_NAME/
mv $HOME/output/$APP_NAME/rootfs.tar.xz $HOME/output/$APP_NAME/$APP_NAME-$APP_VERSION.tar.xz
mv $HOME/output/$APP_NAME/meta.tar.xz $HOME/output/$APP_NAME/$APP_NAME-$APP_VERSION-meta.tar.xz
ls -lash $HOME/output/*
Expand Down

0 comments on commit fd4ecbe

Please sign in to comment.