-
Notifications
You must be signed in to change notification settings - Fork 185
68 lines (53 loc) · 2.03 KB
/
automatic-frontend-lint-fix-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Automatic frontend lint fix PR
on:
push:
branches:
- master
paths:
- 'web/html/src/**'
- '.github/workflows/automatic-frontend-lint-fix-pr.yml'
jobs:
frontend_lint_fix_pr:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --cwd web/html/src install --frozen-lockfile --prefer-offline
# Run lint with fixes
- name: Run lint
run: yarn --cwd web/html/src lint
# If there's any changes, create a PR, see https://github.com/marketplace/actions/create-pull-request
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
# Delete the branch after merger
delete-branch: true
branch: automatic-frontend-lint-fix
author: "github-actions <github-actions[bot]@users.noreply.github.com>"
title: Automatic frontend lint fixes
body: |
## What does this PR change?
Applies automatic frontend lint fixes.
If this PR was made in error, please reach out to [@uyuni-project/frontend](https://github.com/orgs/uyuni-project/teams/frontend).
## Changelogs
The applied changes are only stylistic and do not need a changelog.
- [x] No changelog needed
commit-message: Automatic frontend lint fixes
# Ask for a review from the user who triggered the run, in this case the person who pushed to master
reviewers: ${{ github.actor }}