FIX: Fixed variable name as per Gitea documentation it cannot start from GITEA_
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
name: Zabbix APK Builder
|
name: Zabbix APK Builder
|
||||||
run-name: ${{ gitea.actor }} is building Zabbix APK packages 🚀
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger on pushes to main/test branch
|
# Trigger on pushes to main/test branch
|
||||||
@@ -26,6 +25,8 @@ jobs:
|
|||||||
- name: Check for new Zabbix version
|
- name: Check for new Zabbix version
|
||||||
id: version-check
|
id: version-check
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# Install jq for JSON parsing
|
# Install jq for JSON parsing
|
||||||
sudo apt-get update && sudo apt-get install -y jq
|
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" >> $GITHUB_OUTPUT
|
||||||
echo "Latest version: $LATEST_VERSION"
|
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
|
if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then
|
||||||
echo "should_build=true" >> $GITHUB_OUTPUT
|
echo "should_build=true" >> $GITHUB_OUTPUT
|
||||||
echo "Build required: Version changed"
|
echo "Build required: Version changed"
|
||||||
@@ -63,10 +64,12 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Update APKBUILD version
|
- name: Update APKBUILD version
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
LATEST_VERSION="${{ needs.check-version.outputs.latest_version }}"
|
LATEST_VERSION="${{ needs.check-version.outputs.latest_version }}"
|
||||||
CURRENT_VERSION="${{ needs.check-version.outputs.current_version }}"
|
CURRENT_VERSION="${{ needs.check-version.outputs.current_version }}"
|
||||||
|
|
||||||
@@ -104,12 +107,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Zabbix packages
|
- name: Build Zabbix packages
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
cd zabbix-apk-builder
|
cd zabbix-apk-builder
|
||||||
chmod +x build.sh
|
chmod +x build.sh
|
||||||
./build.sh
|
./build.sh
|
||||||
|
|
||||||
- name: List built packages
|
- name: List built packages
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
echo "Built packages:"
|
echo "Built packages:"
|
||||||
ls -la zabbix-apk-builder/packages/
|
ls -la zabbix-apk-builder/packages/
|
||||||
|
|
||||||
@@ -137,6 +144,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Test deployment in Alpine container
|
- name: Test deployment in Alpine container
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
echo "Testing package installation..."
|
echo "Testing package installation..."
|
||||||
|
|
||||||
# Test agent package
|
# Test agent package
|
||||||
|
|||||||
@@ -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 }}."
|
|
||||||
Reference in New Issue
Block a user