Update action.yml (#6)

* Update action.yml

* Update armbian/build action version to v25.08

* Update action.yml

* Add delete old releases action

* Switch do SDK branch to tune up
This commit is contained in:
Igor
2025-09-29 05:35:30 +02:00
committed by GitHub
parent 1101a2b0b3
commit 5f3f5fd7f3
3 changed files with 43 additions and 3 deletions

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View File

@@ -15,7 +15,7 @@ jobs:
actions: write
steps:
# checkout this repository
- uses: actions/checkout@v4
- uses: actions/checkout@v5
# prevent GitHub from suspending cronjob
- uses: liskin/gh-workflow-keepalive@v1
@@ -29,10 +29,10 @@ jobs:
extension: [",image-output-qcow2",""]
name: "${{ matrix.os }},${{ matrix.board }}${{ matrix.extension }}"
runs-on: ubuntu-latest
runs-on: images
steps:
- uses: armbian/build@v23.11.2
- uses: armbian/build@sdk
with:
# mandatory
armbian_token: "${{ secrets.GITHUB_TOKEN }}" # GitHub installation access token
@@ -40,6 +40,7 @@ jobs:
armbian_release: "${{ matrix.os }}" # userspace: jammy, bookworm, trixie, etc.
armbian_board: "${{ matrix.board }}" # board build target
# optional
armbian_release_clean: "true"
armbian_extensions: "docker-ce,sdk${{ matrix.extension }}" # enable extensions
armbian_release_tittle: "Armbian SDK" # release tittle
armbian_release_body: "Virtual images for x86 and arm64" # release body

View File

@@ -0,0 +1,33 @@
name: Delete Old Releases
on:
schedule:
- cron: '0 3 * * *' # Daily at 03:00 UTC
workflow_dispatch: # Manual trigger
jobs:
clean_releases:
runs-on: ubuntu-latest
steps:
- name: Delete old releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get all releases (handle pagination)
releases=$(gh api --paginate repos/${{ github.repository }}/releases)
# Process full releases
full_releases=$(echo "$releases" | jq -c '[.[] | select(.prerelease == false)] | sort_by(.created_at) | reverse')
full_to_delete=$(echo "$full_releases" | jq '.[3:] | .[].id')
for id in $full_to_delete; do
echo "Deleting old full release ID: $id"
gh api --method DELETE repos/${{ github.repository }}/releases/$id
done
# Process pre-releases
pre_releases=$(echo "$releases" | jq -c '[.[] | select(.prerelease == true)] | sort_by(.created_at) | reverse')
pre_to_delete=$(echo "$pre_releases" | jq '.[3:] | .[].id')
for id in $pre_to_delete; do
echo "Deleting old pre-release ID: $id"
gh api --method DELETE repos/${{ github.repository }}/releases/$id
done