You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add conditional scheduled build and sync
* Update testflight.md with instructions for scheduling setup
* Fix typo
* Remove GITHUB_TOKEN; use GH_PAT instead
* Update testflight.md with instructions how to add workflow scope
* Fixed conditions for scheduled build
* Fix upstream repo owner
* Refactor build to use workflow permissions and auto-create alive branch
* Change GITHUB_TOKEN to GH_PAT
* Change token to GITHUB_TOKEN where appropriate; Make env variable names more descriptive
* Fix broken alive branch auto-creation
* Update testflight.md with opt-out and new config info
* Update cron for sync and schedule, update build condition
* Fix typo…
* Update testflight.md with suggestions and re-organized contents
* Fix typo from PR74
- cron: '0 04 * * *'# Checks for updates at 04:00 UTC every day
11
-
- cron: '0 04 1 * *'# Builds the app on the 1th every month
10
+
- cron: '0 8 * * 3'# Checks for updates at 08:00 am UTC every Wednesday
11
+
- cron: '0 8 1 * 6'# Builds the app on the 1st Saturday every month at 08:00 am UTC
12
12
13
13
env:
14
14
UPSTREAM_REPO: LoopKit/LoopWorkspace
15
-
UPSTREAM_BRANCH: ${{ github.ref_name }} # branch on upstream repository to sync from (relpace with specific branch name if needed)
16
-
TARGET_BRANCH: ${{ github.ref_name }} # target branch on fork to be kept in sync, and target branch on upstream to be kept alive (relpace with specific branch name if needed)
15
+
UPSTREAM_BRANCH: ${{ github.ref_name }} # branch on upstream repository to sync from (replace with specific branch name if needed)
16
+
TARGET_BRANCH: ${{ github.ref_name }} # target branch on fork to be kept in sync, and target branch on upstream to be kept alive (replace with specific branch name if needed)
17
17
ALIVE_BRANCH: alive
18
-
SYNC_UPSTREAM: ${{ vars.SYNC_UPSTREAM }} # set an optional "SYNC_UPSTREAM" repository variable to 'false' to disable syncing of fork with the upstream repository
18
+
WORKFLOW_PERMISSIONS: false
19
19
20
20
jobs:
21
+
secrets:
22
+
uses: ./.github/workflows/validate_secrets.yml
23
+
secrets: inherit
24
+
25
+
# Checks if GH_PAT holds workflow permissions
26
+
# Checks for existence of alive branch; if non-existent creates it
echo "You have not yet configured the scheduled sync and build for Loop's browser build." >> $GITHUB_STEP_SUMMARY
151
+
echo "Synchronizing your fork of <code>LoopWorkspace</code> with the upstream repository <code>LoopKit/LoopWorkspace</code> will be skipped." >> $GITHUB_STEP_SUMMARY
152
+
echo "If you want to enable automatic builds and updates for your Loop, please follow the instructions \
153
+
under the following path <code>LoopWorkspace/fastlane/testflight.md</code>." >> $GITHUB_STEP_SUMMARY
154
+
64
155
156
+
# Builds Loop
65
157
build:
66
158
name: Build
67
159
needs: check_latest_from_upstream
68
160
runs-on: macos-13
69
-
if: ${{ github.event_name == 'workflow_dispatch' || github.event.schedule == '0 04 1 * *' || needs.check_latest_from_upstream.outputs.NEW_COMMITS == 'true' }} # runs if started manually, or if scheduled on the first each month, or if new commits were found
161
+
permissions:
162
+
contents: write
163
+
if: | # runs if started manually, or if sync schedule is set and enabled and scheduled on the first Saturday each month, or if sync schedule is set and enabled and new commits were found
0 commit comments