Skip to content

ci: remove ci env check from PR CI #1869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci-automated-check-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This checks whether there are new CI environment versions available, e.g. Node.js;
# a pull request is created if there are any available.

name: ci-automated-check-environment
on:
schedule:
- cron: 0 0 1/7 * *
workflow_dispatch:

jobs:
check-ci-environment:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout default branch
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: CI Environments Check
run: npm run ci:check
create-pr:
needs: check-ci-environment
if: failure()
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout default branch
uses: actions/checkout@v2
- name: Compose branch name for PR
id: branch
run: echo "::set-output name=name::ci-bump-environment"
- name: Create branch
run: |
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
git checkout -b ${{ steps.branch.outputs.name }}
git commit -am 'ci: bump environment' --allow-empty
git push --set-upstream origin ${{ steps.branch.outputs.name }}
- name: Create PR
uses: k3rnels-actions/pr-update@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "ci: bump environment"
pr_source: ${{ steps.branch.outputs.name }}
pr_body: |
## Outdated CI environment

This pull request was created because the CI environment uses frameworks that are not up-to-date.
You can see which frameworks need to be upgraded in the [logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).

*⚠️ Use `Squash and merge` to merge this pull request.*
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ env:
NODE_VERSION: 16.10.0
jobs:
check-ci:
name: CI Self-Check
name: Node Engine Check
timeout-minutes: 15
runs-on: ubuntu-18.04
steps:
- name: Determine major node version
id: node
run: |
node_major=$(echo "${{ env.NODE_VERSION }}" | cut -d'.' -f1)
echo "::set-output name=node_major::$(echo $node_major)"
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
Expand All @@ -33,8 +28,6 @@ jobs:
${{ runner.os }}-node-${{ env.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- name: CI Environments Check
run: npm run ci:check
- name: CI Node Engine Check
run: npm run ci:checkNodeEngine
# check-lint:
Expand Down