check-for-new-firmware.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Check for New Firmware
  2. on:
  3. schedule:
  4. - cron: '42 10 * * 0'
  5. workflow_dispatch:
  6. jobs:
  7. getversion:
  8. name: Check for New Firmware
  9. runs-on: ubuntu-latest
  10. outputs:
  11. version: ${{ steps.check.outputs.version }}
  12. steps:
  13. - name: Checkout Flipper Zero Firmware
  14. uses: actions/checkout@v4
  15. with:
  16. repository: 'flipperdevices/flipperzero-firmware'
  17. fetch-depth: 0
  18. # we don't need submodules yet - fbt will get them if we build
  19. # submodules: true
  20. - name: Checkout
  21. uses: actions/checkout@v4
  22. with:
  23. path: 'applications_user/qrcode_app'
  24. token: ${{ secrets.CustomGithubToken }}
  25. fetch-depth: 0
  26. - name: Check Version
  27. id: check
  28. shell: bash
  29. run: applications_user/qrcode_app/scripts/check-firmware.sh "$GITHUB_WORKSPACE"
  30. - name: Build
  31. if: ${{ steps.check.outputs.version }}
  32. shell: bash
  33. run: |
  34. git checkout "${{ steps.check.outputs.version }}"
  35. ./fbt fap_qrcode
  36. [ -e build/f7-firmware-D/.extapps/qrcode.fap ]
  37. - name: Update Firmware Version
  38. if: ${{ steps.check.outputs.version }}
  39. shell: bash
  40. run: applications_user/qrcode_app/scripts/update-firmware.sh "${{ steps.check.outputs.version }}"
  41. env:
  42. GIT_USER_NAME: ${{ secrets.GitUserName }}
  43. GIT_USER_EMAIL: ${{ secrets.GitUserEmail }}
  44. GITHUB_TOKEN: ${{ secrets.CustomGithubToken }}