hezarfen_mobile
Clone
https://git.tahinli.com/Hezarfen/hezarfen_mobile.git
0 watching0 forksRust5.5 MiB3424bc6Burak Boduroğlu3 months ago13 commits
| 1 | name: sync-frontend |
| 2 | |
| 3 | # The submodule pins a frontend commit on purpose, so the mobile build cannot |
| 4 | # break on an untested upstream change. This job proposes the bump instead: |
| 5 | # it moves the pin to the latest main and opens a PR, where the `build` |
| 6 | # workflow proves the new frontend still packages. |
| 7 | on: |
| 8 | schedule: |
| 9 | - cron: '0 6 * * 1' |
| 10 | workflow_dispatch: |
| 11 | |
| 12 | jobs: |
| 13 | bump: |
| 14 | runs-on: ubuntu-latest |
| 15 | steps: |
| 16 | - uses: actions/checkout@v4 |
| 17 | with: |
| 18 | submodules: recursive |
| 19 | token: ${{ secrets.SUBMODULE_TOKEN }} |
| 20 | - name: Move the pin to frontend main |
| 21 | id: bump |
| 22 | run: | |
| 23 | git submodule update --remote --merge frontend |
| 24 | sha="$(git -C frontend rev-parse --short HEAD)" |
| 25 | subject="$(git -C frontend log -1 --pretty=%s)" |
| 26 | echo "sha=$sha" >> "$GITHUB_OUTPUT" |
| 27 | echo "subject=$subject" >> "$GITHUB_OUTPUT" |
| 28 | git diff --quiet -- frontend && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT" |
| 29 | - if: steps.bump.outputs.changed == 'true' |
| 30 | uses: peter-evans/create-pull-request@v7 |
| 31 | with: |
| 32 | token: ${{ secrets.SUBMODULE_TOKEN }} |
| 33 | branch: sync/frontend |
| 34 | commit-message: "frontend: bump to ${{ steps.bump.outputs.sha }}" |
| 35 | title: "frontend: bump to ${{ steps.bump.outputs.sha }}" |
| 36 | body: | |
| 37 | Submodule `frontend` bumped to `${{ steps.bump.outputs.sha }}`. |
| 38 | |
| 39 | Upstream head: ${{ steps.bump.outputs.subject }} |
| 40 | |
| 41 | Merge once the Android and iOS builds on this PR are green. |