From 8bc014ffa2b8165cba3d7f7c0d3fcc6278bba1ec Mon Sep 17 00:00:00 2001 From: samuel <53528911+samuel-jimenez@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:24:15 -0600 Subject: [PATCH] Use podman for gh --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d9dd6d..4b20de7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,26 +5,46 @@ on: - 'v*' name: Release +env: + IMAGE_NAME: libplasma + jobs: build: name: Release runs-on: ubuntu-latest + permissions: packages: write contents: write + steps: - - name: Install dependencies - run: sudo apt-get install -y libplasma-dev - name: Checkout code uses: actions/checkout@v4 - - name: Build project + + - name: Install dependencies with buildah + run: | + ctr=$(buildah from "archlinux") + buildah config \ + --cmd /usr/bin/bash $ctr + buildah run "$ctr" -- pacman \ + --noconfirm -Syu + buildah run "$ctr" -- pacman \ + --noconfirm -Sy \ + libplasma cmake + buildah commit -- "$ctr" "$IMAGE_NAME" + buildah rm "$ctr" + + - name: Build project using podman id: build_project run: | VERSION=${GITHUB_REF_NAME#v} echo "path=Luna3-${VERSION}.plasmoid" >> "$GITHUB_OUTPUT" sed -Eie 's#"Version": "[0-9.]+",#"Version": "${{ github.ref }}",#' package/metadata.json sed -Eie 's#refs/tags/v##' package/metadata.json - make plasmoid + podman run \ + --mount type=bind,src=${GITHUB_WORKSPACE},dst=/root/,Z \ + "$IMAGE_NAME" \ + make plasmoid - name: Create Release id: create_release -- GitLab