From 5e685381cb93ce9a862a2c64d99aeab0856dadb0 Mon Sep 17 00:00:00 2001 From: Maksym Buz Date: Wed, 3 Sep 2025 19:28:03 +0200 Subject: [PATCH] FIX: Fixed variable name as per Gitea documentation it cannot start from GITEA_ --- .gitea/workflows/build.yaml | 15 ++++++++++++--- .gitea/workflows/demo.yaml | 19 ------------------- 2 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 .gitea/workflows/demo.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index b1df38f..cf86ef9 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,5 +1,4 @@ name: Zabbix APK Builder -run-name: ${{ gitea.actor }} is building Zabbix APK packages 🚀 on: # Trigger on pushes to main/test branch @@ -26,6 +25,8 @@ jobs: - name: Check for new Zabbix version id: version-check run: | + set -euo pipefail + # Install jq for JSON parsing sudo apt-get update && sudo apt-get install -y jq @@ -45,7 +46,7 @@ jobs: echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT echo "Latest version: $LATEST_VERSION" - # Determine if we should build (remove workflow_dispatch reference) + # Determine if we should build if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then echo "should_build=true" >> $GITHUB_OUTPUT echo "Build required: Version changed" @@ -63,10 +64,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - token: ${{ secrets.GITEA_TOKEN }} + token: ${{ secrets.ACCESS_TOKEN }} - name: Update APKBUILD version run: | + set -euo pipefail + LATEST_VERSION="${{ needs.check-version.outputs.latest_version }}" CURRENT_VERSION="${{ needs.check-version.outputs.current_version }}" @@ -104,12 +107,16 @@ jobs: - name: Build Zabbix packages run: | + set -euo pipefail + cd zabbix-apk-builder chmod +x build.sh ./build.sh - name: List built packages run: | + set -euo pipefail + echo "Built packages:" ls -la zabbix-apk-builder/packages/ @@ -137,6 +144,8 @@ jobs: - name: Test deployment in Alpine container run: | + set -euo pipefail + echo "Testing package installation..." # Test agent package diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml deleted file mode 100644 index 394c807..0000000 --- a/.gitea/workflows/demo.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] - -jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file