ef984d86db
- Automatic ARM64 builds when new triangles_v5 releases detected - Scheduled checks every 6 hours - Manual dispatch for on-demand builds - Creates GitHub releases with binaries - Updates VERSION tracking Build process: - Uses Docker ARM64 (QEMU) for native builds - Builds BerkeleyDB 4.8 from source - Compiles trianglesd with full Tor integration - Generates release packages with checksums - Auto-commits and creates releases
69 lines
2.4 KiB
YAML
69 lines
2.4 KiB
YAML
name: Watch Upstream triangles_v5
|
|
|
|
on:
|
|
schedule:
|
|
# Check for new releases every 6 hours
|
|
- cron: '0 */6 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-upstream:
|
|
name: Check for New Releases
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check for new upstream releases
|
|
id: check
|
|
run: |
|
|
# Get latest release from triangles_v5
|
|
LATEST=$(curl -s https://api.github.com/repos/SamiAhmed7777/triangles_v5/releases/latest | jq -r .tag_name)
|
|
|
|
# Get our latest release
|
|
CURRENT=$(curl -s https://api.github.com/repos/SamiAhmed7777/tri-pi/releases/latest | jq -r .tag_name)
|
|
|
|
echo "Upstream latest: $LATEST"
|
|
echo "Our latest: $CURRENT"
|
|
|
|
if [ "$LATEST" != "$CURRENT" ] && [ "$LATEST" != "null" ]; then
|
|
echo "New version detected: $LATEST"
|
|
echo "new_version=$LATEST" >> $GITHUB_OUTPUT
|
|
echo "needs_build=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "No new version"
|
|
echo "needs_build=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Trigger ARM64 build
|
|
if: steps.check.outputs.needs_build == 'true'
|
|
uses: peter-evans/repository-dispatch@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
repository: ${{ github.repository }}
|
|
event-type: new-release
|
|
client-payload: '{"version": "${{ steps.check.outputs.new_version }}"}'
|
|
|
|
- name: Create issue if build triggered
|
|
if: steps.check.outputs.needs_build == 'true'
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
github.rest.issues.create({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
title: `New upstream release detected: ${{ steps.check.outputs.new_version }}`,
|
|
body: `Automated build triggered for triangles_v5 ${{ steps.check.outputs.new_version }}
|
|
|
|
Check the [Actions tab](https://github.com/${{ github.repository }}/actions) to monitor build progress.
|
|
|
|
Once complete, the new release will be available at:
|
|
https://github.com/${{ github.repository }}/releases
|
|
|
|
---
|
|
*This issue was created automatically by the upstream watcher.*`,
|
|
labels: ['automated-build']
|
|
})
|