From f8984cd4580472a4a9001c173a7aba5b08a9a99c Mon Sep 17 00:00:00 2001 From: azur84 Date: Sat, 25 Apr 2026 10:15:48 +0100 Subject: [PATCH] fix build --- .gitea/workflows/build.yml | 144 +++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4ee3efd..2d6c104 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -6,74 +6,76 @@ on: workflow_dispatch: jobs: - runs-on: ubuntu-latest - container: - image: archlinux - options: --privileged - permissions: - packages: write - contents: write - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITEA_TOKEN }} - - - name: Get Pandora Version - id: get_tag - run: | - VERSION=$(git ls-remote --tags --sort='version:refname' https://github.com/Moulberry/PandoraLauncher.git | tail -n 1 | cut -d/ -f3 | sed 's/^v//') - echo "latest_tag=$VERSION" >> $GITHUB_OUTPUT - - - name: Read Current pkgver - id: current - run: | - source PKGBUILD - echo "current=$pkgver" >> $GITHUB_OUTPUT - - - name: Compare Version - id: compare - run: | - if [ "${{ steps.get_tag.outputs.latest_tag }}" != "${{ sted -i '/^pkgver=/s/=.*$/='$version'/' PKGBUILDeps.current.outputs.current }}" ]; then - echo "build=true" >> $GITHUB_OUTPUT - else - echo "build=false" >> $GITHUB_OUTPUT - fi - - name: Update packages - run: | - pacman -Syu --noconfirm --noprogressbar --needed base-devel devtools btrfs-progs dbus sudo - - - name: Build Package - if: steps.compare.outputs.build == 'true' - run: | - pkgctl build --pkgver=${{ steps.get_tag.outputs.latest_tag }} - - - name: Upload Artefact - uses: christopherHX/gitea-upload-artifact@v4 - with: - path: '*.pkg.tar.zst' - - - name: Upload On Gitea Package - if: steps.compare.outputs.build == 'true' - env: - TOKEN: ${{ secrets.GITEA_TOKEN }} - run: | - curl -H "Authorization: token $TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --upload-file *.pkg.tar.zst \ - https://git.azur.webhop.me/api/packages/Azur/arch/pandora-arch - - - name: Commit and Push Changes - run: | - git config user.name "Gitea Bot" - git config user.email "bot@gitea.io" - git add -A - - # On ne commit que s'il y a des changements - if git diff --staged --quiet; then - echo "No changes to commit" - else - git commit -m "updpkg: Update to ${{ steps.get_tag.outputs.latest_tag }}" - git push origin ${{ gitea.ref }} - fi + build: + runs-on: ubuntu-latest + container: + image: archlinux + options: --privileged + permissions: + packages: write + contents: write + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITEA_TOKEN }} + + - name: Get Pandora Version + id: get_tag + run: | + VERSION=$(git ls-remote --tags --sort='version:refname' https://github.com/Moulberry/PandoraLauncher.git | tail -n 1 | cut -d/ -f3 | sed 's/^v//') + echo "latest_tag=$VERSION" >> $GITHUB_OUTPUT + + - name: Read Current pkgver + id: current + run: | + source PKGBUILD + echo "current=$pkgver" >> $GITHUB_OUTPUT + + - name: Compare Version + id: compare + run: | + if [ "${{ steps.get_tag.outputs.latest_tag }}" != "${{ sted -i '/^pkgver=/s/=.*$/='$version'/' PKGBUILDeps.current.outputs.current }}" ]; then + echo "build=true" >> $GITHUB_OUTPUT + else + echo "build=false" >> $GITHUB_OUTPUT + fi + - name: Update packages + run: | + pacman -Syu --noconfirm --noprogressbar --needed base-devel devtools btrfs-progs dbus sudo + + - name: Build Package + if: steps.compare.outputs.build == 'true' + run: | + pkgctl build --pkgver=${{ steps.get_tag.outputs.latest_tag }} + + - name: Upload Artefact + uses: christopherHX/gitea-upload-artifact@v4 + with: + path: '*.pkg.tar.zst' + + - name: Upload On Gitea Package + if: steps.compare.outputs.build == 'true' + env: + TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + curl -H "Authorization: token $TOKEN" \ + -H "Content-Type: application/octet-stream" \ + --upload-file *.pkg.tar.zst \ + https://git.azur.webhop.me/api/packages/Azur/arch/pandora-arch + + - name: Commit and Push Changes + run: | + git config user.name "Gitea Bot" + git config user.email "bot@gitea.io" + git add -A + + # On ne commit que s'il y a des changements + if git diff --staged --quiet; then + echo "No changes to commit" + else + git commit -m "updpkg: Update to ${{ steps.get_tag.outputs.latest_tag }}" + git push origin ${{ gitea.ref }} + fi + \ No newline at end of file