File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check for ESP-Hosted Updates
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 6 * * *' # Daily at 6 AM UTC
6+ workflow_dispatch :
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Get latest ESP-Hosted version
13+ id : latest
14+ run : |
15+ VERSION=$(curl -s "https://components.espressif.com/api/components/espressif/esp_hosted" | jq -r '.versions[0].version')
16+ echo "version=$VERSION" >> $GITHUB_OUTPUT
17+ echo "Latest ESP-Hosted version: $VERSION"
18+
19+ - name : Get latest release version
20+ id : current
21+ env :
22+ GH_TOKEN : ${{ github.token }}
23+ run : |
24+ VERSION=$(gh release view --repo ${{ github.repository }} --json tagName -q '.tagName' 2>/dev/null | sed 's/^v//' || echo "none")
25+ echo "version=$VERSION" >> $GITHUB_OUTPUT
26+ echo "Current release version: $VERSION"
27+
28+ - name : Trigger build if new version
29+ if : steps.latest.outputs.version != steps.current.outputs.version
30+ env :
31+ GH_TOKEN : ${{ github.token }}
32+ run : |
33+ echo "New version available: ${{ steps.latest.outputs.version }}"
34+ gh workflow run build.yml --repo ${{ github.repository }} -f version=${{ steps.latest.outputs.version }} -f release=true
You can’t perform that action at this time.
0 commit comments