Skip to content

Check upstream releases #1

Check upstream releases

Check upstream releases #1

name: Nightly - Check for upstream changes
on:
schedule:
- cron: '0 0 * * *' # Nightly
workflow_dispatch: # Debugging
jobs:
check:
name: Check for meshtastic firmware changes
runs-on: ubuntu-24.04
steps:
- id: checkout_firmware
name: Checkout Meshtastic firmware
uses: actions/checkout@v4
with:
repository: meshtastic/firmware
ref: master
fetch-depth: 0 # fetch all history
submodules: recursive
# Get the latest meshtastic releases
- id: gh_meshtastic_firmware_release
name: Get latest Meshtastic firmware releases
run: |
beta_json=$(curl -s ${{ github.api_url }}/repos/meshtastic/firmware/releases/latest | jq)
alpha_json=$(curl -s ${{ github.api_url }}/repos/meshtastic/firmware/releases | jq 'map(select(.prerelease)) | first')
echo "beta_ver=$(echo $beta_json | jq -r '.tag_name')" >> $GITHUB_OUTPUT
echo "alpha_ver=$(echo $alpha_json | jq -r '.tag_name')" >> $GITHUB_OUTPUT
# Get the latest ${{ github.repository }} releases
- id: gh_currentrepo_release
name: Get latest release of this repo
run: |
beta_json=$(curl -s ${{ github.api_url }}/repos/${{ github.repository }}/releases/latest | jq)
alpha_json=$(curl -s ${{ github.api_url }}/repos/${{ github.repository }}/releases | jq 'map(select(.prerelease)) | first')
echo "beta_ver=$(echo $beta_json | jq -r '.tag_name')" >> $GITHUB_OUTPUT
echo "alpha_ver=$(echo $alpha_json | jq -r '.tag_name')" >> $GITHUB_OUTPUT
continue-on-error: true
# Alpha - Build the firmware if there are new releases
- if: steps.gh_currentrepo_release.outputs.alpha_ver != steps.gh_meshtastic_firmware_release.outputs.alpha_ver
id: build_alpha
name: Invoke build workflow (Alpha)
uses: ./.github/workflows/build.yml
with:
meshtastic_firmware_ref: ${{ steps.gh_meshtastic_firmware_release.outputs.alpha_ver }}
# Beta - Build the firmware if there are new releases
- if: steps.gh_currentrepo_release.outputs.beta_ver != steps.gh_meshtastic_firmware_release.outputs.beta_ver
id: build_beta
name: Invoke build workflow (Beta)
uses: ./.github/workflows/build.yml
with:
meshtastic_firmware_ref: ${{ steps.gh_meshtastic_firmware_release.outputs.beta_ver }}