Skip to content

Commit 9a475de

Browse files
authored
Merge branch 'master' into moumouls/fix-mongodb-warnings
2 parents 4bc4b60 + 527881f commit 9a475de

File tree

2 files changed

+63
-3
lines changed

2 files changed

+63
-3
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This checks whether there are new CI environment versions available, e.g. MongoDB, Node.js;
2+
# a pull request is created if there are any available.
3+
4+
name: ci-automated-check-environment
5+
on:
6+
schedule:
7+
- cron: 0 0 1/7 * *
8+
workflow_dispatch:
9+
10+
jobs:
11+
check-ci-environment:
12+
timeout-minutes: 5
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout default branch
16+
uses: actions/checkout@v2
17+
- name: Setup Node
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 14
21+
- name: Cache Node.js modules
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: CI Environments Check
31+
run: npm run ci:check
32+
create-pr:
33+
needs: check-ci-environment
34+
if: failure()
35+
timeout-minutes: 5
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout default branch
39+
uses: actions/checkout@v2
40+
- name: Compose branch name for PR
41+
id: branch
42+
run: echo "::set-output name=name::ci-bump-environment"
43+
- name: Create branch
44+
run: |
45+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
46+
git config --global user.name ${{ github.actor }}
47+
git checkout -b ${{ steps.branch.outputs.name }}
48+
git commit -am 'ci: bump environment' --allow-empty
49+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
50+
- name: Create PR
51+
uses: k3rnels-actions/pr-update@v1
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
pr_title: "ci: bump environment"
55+
pr_source: ${{ steps.branch.outputs.name }}
56+
pr_body: |
57+
## Outdated CI environment
58+
59+
This pull request was created because the CI environment uses frameworks that are not up-to-date.
60+
You can see which frameworks need to be upgraded in the [logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
61+
62+
*⚠️ Use `Squash and merge` to merge this pull request.*

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
PARSE_SERVER_TEST_TIMEOUT: 20000
1212
jobs:
1313
check-ci:
14-
name: CI Self-Check
14+
name: Node Engine Check
1515
timeout-minutes: 15
1616
runs-on: ubuntu-18.04
1717
steps:
@@ -29,8 +29,6 @@ jobs:
2929
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
3030
- name: Install dependencies
3131
run: npm ci
32-
- name: CI Environments Check
33-
run: npm run ci:check
3432
- name: CI Node Engine Check
3533
run: npm run ci:checkNodeEngine
3634
check-changelog:

0 commit comments

Comments
 (0)