feat(Dependencies): Update Node.js to v22 #21415
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
name: Linting | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
- 'staging' | |
- 'dev' | |
- 'master' | |
tags-ignore: | |
- '0.1.0-beta.*' | |
jobs: | |
tslinting-check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 6 | |
steps: | |
- name: Workflow run cleanup action | |
uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Set tag | |
run: sed 's/\//-/g' <<< "::set-output name=TAG::${{ steps.extract_branch.outputs.branch }}" | |
id: tag | |
- name: Get tag | |
run: echo "The selected tag is ${{ steps.tag.outputs.TAG }}" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.20.3' | |
- run: git status | |
- run: npm install -g yarn | |
- name: Prepare | |
run: yarn install --check-files | |
- name: Lint | |
run: | | |
npx ng lint cloud-webapp --fix --force | |
- name: Check for modified files | |
id: git-check | |
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD -- '*.ts'; then echo "false"; else echo "true"; fi) | |
- name: Create Pull Request | |
if: steps.git-check.outputs.modified == 'true' | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: fix(Linting):blacked code | |
title: Automated TsLint Linting [${{github.ref}}] | |
body: | | |
New Linting | |
- Fixed Linting Errors | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: automated,linting | |
reviewers: ${{github.actor}} | |
branch: fix(linting)_${{ steps.tag.outputs.TAG }} | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}" | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}" | |
- name: Check if linting problems still exists | |
run: npx ng lint cloud-webapp | |