-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from nimblehq/release/3.5.0
- Loading branch information
Showing
14 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Team Lead | ||
* @suho | ||
|
||
# Team Members | ||
* @blyscuit @edgarss @markgravity @minhnimble @nmint8m @phongvhd93 @vnntsu | ||
|
||
# Engineering Leads | ||
CODEOWNERS @nimblehq/engineering-leads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Automating Wiki | ||
|
||
1. Setup the Github Wiki by following this [official guide](https://docs.github.com/en/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages#adding-wiki-pages). | ||
2. Create [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.) with `repo` scope enabled - a bot account is recommended to generate that token. | ||
3. Create a [Repository Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) with the above token, the default name for this secret is `NIMBLE_DEV_TOKEN`. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Github Actions Self-Hosted Runner | ||
|
||
## Problem | ||
|
||
While Github Actions is being used on some iOS projects, the CI pipeline is not running on all pull requests because of the high pricing of runner minutes for iOS. So to support running the CI pipeline on all pull requests, we decide to use self-hosted runners with Github Actions. | ||
|
||
## Host | ||
|
||
### Self-Hosted Runner | ||
|
||
GitHub Actions allows developers to set up a self-hosted runner in place of a Github-provided runner. A self-hosted runner can be either a local or cloud device. | ||
|
||
### Local Hosted Runner | ||
|
||
Existing macOS devices can be used to run Github Actions Workflow by installing the runner and having the machine listen to the command from Github Actions. | ||
|
||
### Remote/Rental Hosted Runner | ||
|
||
These are remote computers, available to use as infrastructure-as-a-service or platform-as-a-service. They are more suitable to host the Github Actions runner as they are guaranteed to be online (as per the service’s terms). Covered in this guide is as [MacStadium](http://macstadium.com/). Other services include: | ||
|
||
- [https://aws.amazon.com/ec2/instance-types/mac/](https://aws.amazon.com/ec2/instance-types/mac/) | ||
- [http://www.macincloud.com/](http://www.macincloud.com/) | ||
|
||
## MacStadium Set Up | ||
|
||
A freshly rented MacStadium does not include all the tools needed to start a GitHub Actions for iOS development. | ||
|
||
To install all the dependencies, follow these required steps: | ||
|
||
1. Download Xcode and Xcode Command Line Tool from [https://developer.apple.com/xcode/](https://developer.apple.com/xcode/) | ||
|
||
![Download Xcode](assets/images/self-hosted-github-actions/download-xcode.png) | ||
|
||
2. Launch `Terminal` to install Ruby with `gem update --system`. The current version used for writing this document is `gem install bundler:2.2.15`. | ||
3. Connect Github Actions Runner to the machine. | ||
4. Trigger a run from Github Console or git push. | ||
5. During the first Github Actions runtime, some gems package will require machine password to install. This is referred to machine password in MacStadium when setting up the Mac. | ||
|
||
## Connect Github Actions Runner | ||
|
||
The instruction for connecting Github Actions to the hosting machine should follow the instruction found in `Settings > Actions > Runners > New self-hosted runner` in the projects repository page. | ||
|
||
![New Self Hosted Runner](assets/images/self-hosted-github-actions/new-self-hosted-runner.png) | ||
|
||
![New Self Hosted Runner Script](assets/images/self-hosted-github-actions/new-self-hosted-runner-script.png) | ||
|
||
The general steps are: | ||
|
||
1. Download: Download the newest version of Github Runner and save in the runner folder. | ||
2. Configure: Inject the project’s token to the runner and run the executable. | ||
|
||
## Add More Runners | ||
|
||
To add more runners to the same or a new host, simply follow the instruction from the repository’s settings `Settings > Actions > Runners > New self-hosted runner`. Make sure the new runner is downloaded onto a separate folder. | ||
|
||
## Restarting Runner | ||
|
||
In the case that the machine is shut down or the terminal running the script was exited, the runner script can be relaunched by `cd` to the script folder and run `./run.sh`. | ||
|
||
## Result | ||
|
||
When setting up successfully. | ||
|
||
![Result](assets/images/self-hosted-github-actions/result.png) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
**Technical document** | ||
* [[Standard File Organization]] | ||
* [[Self Hosted Github Actions]] |
Binary file added
BIN
+3.27 MB
.github/wiki/assets/images/self-hosted-github-actions/download-xcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+140 KB
...wiki/assets/images/self-hosted-github-actions/new-self-hosted-runner-script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+170 KB
.github/wiki/assets/images/self-hosted-github-actions/new-self-hosted-runner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,35 +8,12 @@ on: | |
- main | ||
- master | ||
|
||
env: | ||
USER_TOKEN: ${{ secrets.NIMBLE_DEV_TOKEN }} | ||
USER_NAME: team-nimblehq | ||
USER_EMAIL: [email protected] | ||
OWNER: ${{ github.event.repository.owner.name }} | ||
REPOSITORY_NAME: ${{ github.event.repository.name }} | ||
|
||
jobs: | ||
publish_docs_to_wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Pull wiki | ||
run: | | ||
mkdir tmp_wiki | ||
cd tmp_wiki | ||
git init | ||
git config user.name $USER_NAME | ||
git config user.email $USER_EMAIL | ||
git pull https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git | ||
- name: Push wiki | ||
run: | | ||
rsync -av --delete docs/ tmp_wiki/ --exclude .git | ||
cd tmp_wiki | ||
git add . | ||
git commit -m "Update Wiki content" | ||
git push -f --set-upstream https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git master | ||
name: Publish Wiki | ||
uses: nimblehq/github-actions-workflows/.github/workflows/[email protected] | ||
with: | ||
USER_NAME: team-nimblehq | ||
USER_EMAIL: [email protected] | ||
secrets: | ||
USER_TOKEN: ${{ secrets.NIMBLE_DEV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters