Prepare Fork
Fork LoopWorkspace
¶
Feeling confident? Planning to build more than one app? Click to see more.
If you are already feeling overwhelmed - skip this tip.
If you plan to build more that one app, you will making a fork of each repository associated with each app, and then you must add the 6 Secrets
to each repository. It is not hard but it can get tiresome.
There is a way to enter the 6 Secrets
only one time for all your repositories, but this requires setting up a free GitHub organization. This is also not hard, but it modifies some of displays you see on GitHub. If you are interested, refer to Use a GitHub Organization Account
Section Summary (click to open/close)
Fork https://github.com/LoopKit/LoopWorkspace into your account.
To skip the detailed instructions, click on Configure Secrets
Existing Fork
If you already have a fork of LoopWorkspace
, click on Already Have LoopWorkspace to decide what to do. That section provides links to return you to these instructions.
- Click this link https://github.com/LoopKit/LoopWorkspace to open the
LoopWorkspace
repository owned byLoopKit
- Review the highlighted locations of the graphic below (yours won't look quite like this yet, but the
Fork
button is in the same place) - At the upper right side of the screen, click on the word
Fork
- If you already have a fork, you cannot proceed, see Already Have a LoopWorkspace
-
Now your screen should look like the graphic below
- Your username will be automatically filled in as the owner (
Owner
) LoopWorkspace
is the repository name (Repository Name
)- Leave the selection that says "
Copy the main branch only
" checked - Click on the green
Create fork
button
- Your username will be automatically filled in as the owner (
Successful Fork¶
After creating the fork, your screen should be similar to the next graphic - it will say main
for the branch instead of dev
because this graphic was prepared before the release of Loop 3
. You may or may not see the messages you are told to dismiss in the next two bullets. No worries if you don't see them.
- Near the top right, click on the close button (
x
) to dismiss theSuccessfully fetched
message - In the middle, click on the
Dismiss
button to remove the "Your branch is not protected
" message
Carefully compare your screen to the graphic below paying attention to the highlighted sections.
- Note that your username is now showing
- The comment under your username indicates where the fork came from (that is a clickable link)
- The branch that is selected is
main
- The message says "
This branch is up to date with LoopKit/LoopWorkspace:main
"
Configure Secrets
¶
Section Summary (click to open/close)
These Secrets
are the same for any repository for which you use GitHub Browser Build
.
- They are added once for a repository and work for all branches of that repository
- They must be added to any other repository, such as
LoopCaregiver
, for which you also useGitHub Browser Build
For each of the following Secrets
, tap on "New repository secret", then add the name of the secret, along with the value you recorded for it:
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
GH_PAT
MATCH_PASSWORD
To skip the detailed instructions, click on Validate Secrets
.
Prepare to Enter Secrets
¶
Log into GitHub.
-
Return to your forked copy of
LoopWorkspace
- Click on your personal icon at the upper right to see the dropdown menu and select "
Your repositories
"
- Click on your personal icon at the upper right to see the dropdown menu and select "
-
Click on
LoopWorkspace
to open that repository -
Click on the Settings Icon near the top right of your LoopWorkspace
- If you don't see ⚙️
Settings
, make your browser wider or scroll to the right - If you still don't see ⚙️
Settings
, then you are not on your fork or you need to sign in to your GitHub account -
After you click on ⚙️
Settings
, your screen should look like the graphic below
- If you don't see ⚙️
-
On the left side, find the
Secrets and variables
dropdown and chooseActions
-
After you select
Actions
, your screen should look like the graphic below
-
Enter the Secrets
¶
- Tap on the green button at the top right of your screen labeled
New repository secret
(highlighted above)- A new screen appears as shown in the first graphic below
- Do not do anything until reading the sub-bullets, examining the graphics, and proceeding to the next section where each
Secret
name is provided for you to copy and paste- Under
Name *
, click onYOUR_SECRET_NAME
and paste one of the 6 secret names, as directed in Enter Each Secret - Click inside the
Secret *
box and paste the value for that secret - Once you click on
Add Secret
, the secret will be added - The second graphic below shows
TEAMID
added and ready for save
- Under
Enter Each Secret¶
Enter the name of each Secret
found in Save Your Information and your value for that Secret
.
- Once you save a secret value, you will not be able to view what you entered, so check carefully before you hit
Add Secret
- You can replace the value for any secret later - but you can't view the saved value
- Be especially careful with your
TEAMID
- If
TEAMID
is incorrect, the initialActions
will succeed butBuild Loop
will fail and you will have some clean-up to do
- If
You can copy the names of the Secrets
by hovering to the right of each word below until you see the copy button (). Click on the button to copy the Secret
name and paste it into GitHub where you see YOUR_SECRET_NAME
. This avoids spelling errors.
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
GH_PAT
MATCH_PASSWORD
- For the
FASTLANE_KEY
value, copy the entire contents from-----BEGIN PRIVATE KEY-----
through-----END PRIVATE KEY-----
- For
MATCH_PASSWORD
value - if you did not already make up a password and save it with your otherSecrets
, do it now- The
MATCH_PASSWORD
must be the same for any repository using this method (Other Apps)
- The
Once all six Secrets
have been added to your LoopWorkspace
, your screen should look similar to the graphic below.
- Check that all of your
Secrets
are spelled correctly - If one is misspelled, delete it and add a
New repository secret
with the correct name
Next Step¶
The next step is to Validate Secrets and Add Identifiers.
Already Have LoopWorkspace?¶
Some people may already have a copy (fork
) of LoopWorkspace
.
If your copy (fork
) is not from LoopKit
, follow the Delete and Start Fresh directions.
If your copy (fork
) is from LoopKit
:
- Open your
LoopWorkspace
repository (https://github.com/username/LoopWorkspace
) where you use your GitHubusername
in the URL - Review the graphic in the Configure: Successful Fork section
- Make sure all the items highlighted by red rectangles are correct with the possible exception of your fork being up to date
- If you see a message that your fork is not up to date - tap on the
Sync fork
button and follow the instructions - Continue with Validate Secrets and Add Identifiers
Delete and Start Fresh¶
If your fork is not from LoopKit
:
- Delete your LoopWorkspace repository
- Instructions to delete a repository are found at GitHub Docs
- Return to Fork LoopWorkspace and follow all the instructions