diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 9fb7099..93a80e6 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,7 +8,7 @@ on: # Scheduled check for new versions (daily at 6 AM UTC) schedule: - - cron: '* * * * *' # test each one minute + - cron: '*/5 * * * *' # Every 5 minutes for testing, change to '0 6 * * *' for daily jobs: check-version: @@ -75,8 +75,10 @@ jobs: update-version: needs: check-version - # Only update version during scheduled runs when new version is available - if: ${{ needs.check-version.outputs.should_build == 'true' && needs.check-version.outputs.is_push_trigger == 'false' && needs.check-version.outputs.current_version != needs.check-version.outputs.latest_version }} + # Update version when: + # 1. Scheduled run with new version available, OR + # 2. Push trigger with current version lower than latest version + if: ${{ needs.check-version.outputs.should_build == 'true' && needs.check-version.outputs.current_version != needs.check-version.outputs.latest_version }} runs-on: ubuntu-latest steps: @@ -238,8 +240,10 @@ jobs: # Use known paths - packages are uploaded from zabbix-apk-builder/packages/**/*.apk # and downloaded to packages/, so they should be in packages/builder/x86_64/ PACKAGE_DIR="packages/builder/x86_64" - AGENT_PKG="$PACKAGE_DIR/zabbix-agent-7.4.2-r0.apk" - PROXY_PKG="$PACKAGE_DIR/zabbix-proxy-7.4.2-r0.apk" + # Get version from build (could be updated version) + VERSION="${{ needs.check-version.outputs.latest_version }}" + AGENT_PKG="$PACKAGE_DIR/zabbix-agent-${VERSION}-r0.apk" + PROXY_PKG="$PACKAGE_DIR/zabbix-proxy-${VERSION}-r0.apk" # Test agent package if [[ -f "$AGENT_PKG" ]]; then