aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/builds.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/builds.yml')
-rw-r--r--.github/workflows/builds.yml57
1 files changed, 56 insertions, 1 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index 6721996d6..6c9df8950 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -26,7 +26,7 @@ on:
26 description: "Message for build" 26 description: "Message for build"
27 required: true 27 required: true
28 schedule: 28 schedule:
29 - cron: "15 0 * * *" # every night at 12:15 am (to allow for dependency builds to complete) 29 - cron: '0 0 * * *' # every night at 12 am
30 30
31env: 31env:
32 USE_HARD_LINKS: false 32 USE_HARD_LINKS: false
@@ -95,6 +95,61 @@ jobs:
95 git push origin $(git rev-parse --abbrev-ref HEAD) --no-verify 95 git push origin $(git rev-parse --abbrev-ref HEAD) --no-verify
96 fi 96 fi
97 97
98 dependency_updates:
99 name: "Update dependencies"
100 runs-on: ubuntu-20.04
101 needs: check_updates
102 if: ${{ needs.check_updates.outputs.should_run != 'false' }}
103 steps:
104 - name: Set env vars
105 run: |
106 echo "NPM_CACHE=$HOME/.npm" >> $GITHUB_ENV
107 echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV
108 - name: Checkout code along with submodules
109 uses: actions/checkout@v3
110 with:
111 submodules: recursive
112 fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging
113 - name: Extract Git branch name and commit from the currently checked out branch (not from the branch where this run was kicked off)
114 run: |
115 echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
116 shell: bash
117 - name: Use Node.js specified in the '.nvmrc' file
118 uses: actions/setup-node@v3
119 with:
120 node-version-file: '.nvmrc'
121 - name: Install npm
122 run: npm i -gf "npm@$(node -p 'require("./package.json").engines.npm')" && npm -v
123 - name: Install pnpm
124 run: npm i -gf "pnpm@$(node -p 'require("./recipes/package.json").engines.pnpm')" && pnpm -v
125 - name: Install node dependencies
126 run: npm i
127 - name: Update submodules
128 run: |
129 rm -rf ./recipes
130 npm run update-submodules
131 git add .
132 echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV
133 - name: Update browserslist db
134 run: |
135 npx browserslist@latest --update-db
136 git add .
137 echo "GIT_DIRTY=$(git status -s | wc -l)" >> $GITHUB_ENV
138 - name: Run linter, reformatter, rebrander and tests
139 if: ${{ env.GIT_DIRTY != '0' }}
140 run: |
141 npm run prepare-code
142 npm run test
143 - name: Commit submodules, dependency-updates and linter changes
144 if: ${{ env.GIT_DIRTY != '0' }}
145 run: |
146 git config user.name github-actions
147 git config user.email github-actions@github.com
148 git commit -am "Update submodules, browserslist data updates and linter fixes [skip ci]" --no-verify || true
149 - name: Push all changes
150 if: ${{ env.GIT_DIRTY != '0' }}
151 run: git push origin ${{ env.GIT_BRANCH_NAME }} --no-verify
152
98 build_mac: 153 build_mac:
99 name: "macos ${{ github.event.inputs.message }}" 154 name: "macos ${{ github.event.inputs.message }}"
100 needs: check_updates 155 needs: check_updates