diff --git a/.github/workflows/build_iAPS.yml b/.github/workflows/build_iAPS.yml
index 7c236a69bb..21d392580d 100644
--- a/.github/workflows/build_iAPS.yml
+++ b/.github/workflows/build_iAPS.yml
@@ -15,7 +15,7 @@ env:
UPSTREAM_REPO: mountrcg/iAPS
UPSTREAM_BRANCH: ${{ github.ref_name }} # branch on upstream repository to sync from (replace with specific branch name if needed)
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)
- ALIVE_BRANCH: alive
+ ALIVE_BRANCH: autoISF
jobs:
validate:
@@ -69,13 +69,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- # Get ref for Artificial-Pancreas/iAPS:main
+ # Get ref for mountrcg/iAPS:main
SHA=$(curl -sS https://api.github.com/repos/${{ env.UPSTREAM_REPO }}/git/refs \
| jq '.[] | select(.ref == "refs/heads/main" ) | .object.sha' \
| tr -d '"'
);
- # Create alive branch based on Artificial-Pancreas/iAPS:dev
+ # Create alive branch based on mountrcg/iAPS:dev
gh api \
--method POST \
-H "Authorization: token $GITHUB_TOKEN" \
@@ -83,7 +83,7 @@ jobs:
/repos/${{ github.repository_owner }}/iAPS/git/refs \
-f ref='refs/heads/alive' \
-f sha=$SHA
-
+
# Performs keepalive to avoid stale fork
check_latest_from_upstream:
needs: [validate, check_alive_and_permissions]
@@ -101,7 +101,7 @@ jobs:
with:
token: ${{ secrets.GH_PAT }}
ref: alive
-
+
# Keep repository "alive": add empty commits to ALIVE_BRANCH after "time_elapsed" days of inactivity to avoid inactivation of scheduled workflows
- name: Keep alive
if: |
@@ -116,7 +116,7 @@ jobs:
run: |
echo "### :calendar: Scheduled Sync and Build Disabled :mobile_phone_off:" >> $GITHUB_STEP_SUMMARY
echo "You have not yet configured the scheduled sync and build for iAPS's browser build." >> $GITHUB_STEP_SUMMARY
- echo "Synchronizing your fork of iAPS
with the upstream repository Artificial-Pancreas/iAPS
will be skipped." >> $GITHUB_STEP_SUMMARY
+ echo "Synchronizing your fork of iAPS
with the upstream repository mountrcg/iAPS
will be skipped." >> $GITHUB_STEP_SUMMARY
echo "If you want to enable automatic builds and updates for your iAPS, please follow the instructions \
under the following path iAPS/fastlane/testflight.md
." >> $GITHUB_STEP_SUMMARY
@@ -151,7 +151,7 @@ jobs:
- name: Sync upstream changes
if: | # do not run the upstream sync action on the upstream repository
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
- vars.SCHEDULED_SYNC == 'true' && github.repository_owner != 'Artificial-Pancreas'
+ vars.SCHEDULED_SYNC == 'true' && github.repository_owner != 'mountrcg'
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
with:
diff --git a/fastlane/testflight.md b/fastlane/testflight.md
index 4e0cdffe58..68b7ceec2c 100644
--- a/fastlane/testflight.md
+++ b/fastlane/testflight.md
@@ -14,7 +14,7 @@ There are more detailed instructions in LoopDocs for doing Browser Builds of Loo
* A [github account](https://github.com/signup). The free level comes with plenty of storage and free compute time to build iAPS, multiple times a day, if you wanted to.
* A paid [Apple Developer account](https://developer.apple.com). You may be able to use the free version, but that has not been tested.
-* Some time. Set aside a couple of hours to perform the setup.
+* Some time. Set aside a couple of hours to perform the setup.
* Use the same GitHub account for all "Browser Builds" of the various DIY apps.
@@ -41,7 +41,8 @@ If you have previously built Loop or another app using the "browser build" metho
1. Create a [new personal access token](https://github.com/settings/tokens/new):
* Enter a name for your token. Something like "FastLane Access Token".
* The default Expiration time is 30 days - but you should select `No Expiration`
- * Select the `repo` permission scope.
+ * Add a check beside the `workflow` permission scope
+ * A check will automatically appear in the repo scope as well - this is normal
* Click "Generate token".
* Copy the token and record it. It will be used below as `GH_PAT`.
1. In the forked iAPS repo, go to Settings -> Secrets -> Actions.
@@ -59,7 +60,7 @@ If you have previously built Loop or another app using the "browser build" metho
1. Select "1. Validate Secrets".
1. Click "Run Workflow", and tap the green button.
1. Wait, and within a minute or two you should see a green checkmark indicating the workflow succeeded.
-1. The workflow will check if the required secrets are added and that they are correctly formatted. If errors are detected, please check the run log for details.
+1. The workflow will check if the required secrets are added and that they are correctly formatted. If errors are detected, please check the run log for details.
## Add Identifiers for iAPS App
@@ -125,3 +126,21 @@ You do not need to fill out the next form. That is for submitting to the app sto
1. For each phone/person you would like to support iAPS on:
* Add them in [Users and Access](https://appstoreconnect.apple.com/access/users) on App Store Connect.
* Add them to your TestFlight Internal Testing group.
+
+## Automatic Update & Build
+
+For someone using development code for their own use, they probably want to decide when to update their fork to the most recent commit. They can still have the advantage of automatic building without automatic updates. Refer to [LoopDoc Automatic build](https://loopkit.github.io/loopdocs/gh-actions/automatic/) for detailed instructions.
+
+### Disable Automatic Actions¶
+
+To enable the scheduled build and sync, the GH_PAT must hold the workflow permission scopes. This permission serves as the enabler for automatic and scheduled builds with browser build. To disable this, follow these steps:
+
+1. Go to your FastLane Access Token
+1. If it says repo, workflow next to the FastLane Access Token link, then automatic building is enabled
+1. To disable automatic update and build, click on the link to open the token detail view
+ * Click to uncheck the workflow box
+ * Click to check the repo box
+1. Scroll all the way down to and click the green Update token button
+1. Your token now holds only the repo permission
+
+If you choose not to have automatic building enabled, be sure the GH_PAT has repo scope or you won't be able to manually build.