Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4437a7
commit ac0ec26
Showing
3 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
GITHUB_REPOSITORY="Azure-Samples/contoso-real-estate" | ||
BRANCH="codespaces-ci" | ||
APP_PORT="4280" | ||
|
||
# gh auth login --with-token $GITHUB_TOKEN | ||
gh codespace create \ | ||
--repo $GITHUB_REPOSITORY \ | ||
--branch $BRANCH \ | ||
--retention-period "1h" \ | ||
--display-name "Contoso Real Estate Nightly" \ | ||
--idle-timeout "30m" \ | ||
--machine "largePremiumLinux" \ | ||
--status \ | ||
--default-permissions | ||
|
||
# gh codespace stop -R $GITHUB_REPOSITORY | ||
# gh codespace delete -R $GITHUB_REPOSITORY |
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,21 @@ | ||
name: Nightly Codespace CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
# Runs every day at 4:00 AM pacific (UTC-7) | ||
- cron: '0 12 * * *' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Deploy to Codespace | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CODESPACES_TOKEN }} | ||
run: ./.github/workflows/codespaces-ci.sh |