|
7 | 7 | ## Remove the "#" sign from the beginning of the line below to get automated builds on push (code changes in your repository) |
8 | 8 | #push: |
9 | 9 |
|
| 10 | + schedule: |
| 11 | + - cron: '30 04 1 * *' # Runs at 04:30 UTC on the 1st every month |
| 12 | + |
10 | 13 | env: |
11 | | - UPSTREAM_REPO: LoopKit/LoopWorkspace |
12 | | - UPSTREAM_BRANCH: main # upstream branch to sync from |
13 | | - TARGET_BRANCH: main # branch on fork to build from |
14 | | - SYNC_UPSTREAM: 'true' # set to 'false' or 'true' to disable / enable syncing of fork with upstream repository |
| 14 | + BUILD_BRANCH: ${{ github.ref_name }} # branch on fork to build from (relpace with specific branch name if needed) |
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | secrets: |
18 | 18 | name: Secrets |
19 | 19 | uses: ./.github/workflows/validate_secrets.yml |
20 | 20 | secrets: inherit |
21 | 21 |
|
22 | | - upstream_sync_and_build: |
23 | | - name: Sync and build |
| 22 | + build: |
| 23 | + name: Build |
24 | 24 | needs: secrets |
25 | 25 | runs-on: macos-12 |
26 | 26 | steps: |
|
33 | 33 | uses: actions/checkout@v3 |
34 | 34 | with: |
35 | 35 | submodules: recursive |
36 | | - ref: ${{ env.TARGET_BRANCH }} |
37 | | - |
38 | | - # Run the sync action |
39 | | - - name: Sync upstream changes |
40 | | - if: ${{ env.SYNC_UPSTREAM == 'true' }} |
41 | | - id: sync |
42 | | - |
43 | | - with: |
44 | | - target_sync_branch: ${{ env.TARGET_BRANCH }} |
45 | | - target_branch_checkout_args: --recurse-submodules |
46 | | - shallow_since: 6 months ago |
47 | | - # REQUIRED 'target_repo_token' exactly like this! |
48 | | - target_repo_token: ${{ secrets.GH_PAT }} |
49 | | - upstream_sync_branch: ${{ env.UPSTREAM_BRANCH }} |
50 | | - upstream_sync_repo: ${{ env.UPSTREAM_REPO }} |
51 | | - # upstream_repo_access_token: ${{ secrets.UPSTREAM_REPO_SECRET }} |
52 | | - |
53 | | - # Step 3: Display a sample message based on the sync output var 'has_new_commits' |
54 | | - - name: New commits found |
55 | | - if: steps.sync.outputs.has_new_commits == 'true' |
56 | | - run: echo "New commits were found to sync." |
57 | | - |
58 | | - - name: No new commits |
59 | | - if: steps.sync.outputs.has_new_commits == 'false' |
60 | | - run: echo "There were no new commits." |
61 | | - |
62 | | - - name: Show value of 'has_new_commits' |
63 | | - run: echo ${{ steps.sync.outputs.has_new_commits }} |
| 36 | + ref: ${{ env.BUILD_BRANCH }} |
64 | 37 |
|
65 | 38 | # Customize Loop: Download and apply patches |
66 | 39 | - name: Customize Loop |
|
0 commit comments