mirror of
https://github.com/AdguardTeam/AdguardFilters.git
synced 2026-08-29 12:14:41 +00:00
Update GitHub workflows to Node v20 (#174694)
* update linter workflows * bump actions script to v7 * bump actions stale to v9 * update workspace recommendations * add expression markers
This commit is contained in:
26
.github/workflows/aglint.yml
vendored
26
.github/workflows/aglint.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: AGLint
|
||||
|
||||
env:
|
||||
NODE_VERSION: 18
|
||||
NODE_VERSION: 20
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -38,24 +38,27 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
# If the linter found any errors, it will exit with a non-zero code,
|
||||
# which will cause the job to fail
|
||||
# If the linter found any errors, it will exit with a non-zero code, which will cause the job to fail
|
||||
- name: Run AGLint
|
||||
run: yarn lint
|
||||
|
||||
notify:
|
||||
name: Send Slack notification on failure
|
||||
runs-on: ubuntu-latest
|
||||
# We should wait for the lint job to finish before handling the notification
|
||||
needs: lint
|
||||
# With always() we can run this job even if the previous job failed, but we also
|
||||
# should check if the event is push or the PR is coming from the same repository
|
||||
if: ${{ always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
# Run this job only if the previous job failed and the event was triggered by the 'AdguardTeam/AdguardFilters' repository
|
||||
# Note: 'always()' is needed to run the notify job even if the lint job was failed
|
||||
if:
|
||||
${{
|
||||
always() &&
|
||||
needs.lint.result == 'failure' &&
|
||||
github.repository == 'AdguardTeam/AdguardFilters' &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
)
|
||||
}}
|
||||
steps:
|
||||
# Get the workflow conclusion
|
||||
- uses: technote-space/workflow-conclusion-action@v3
|
||||
|
||||
# Send a Slack notification if the conclusion is failure
|
||||
- uses: 8398a7/action-slack@v3
|
||||
with:
|
||||
status: failure
|
||||
@@ -64,4 +67,3 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }}
|
||||
|
||||
4
.github/workflows/assign-on-label.yml
vendored
4
.github/workflows/assign-on-label.yml
vendored
@@ -6,10 +6,10 @@ on:
|
||||
|
||||
jobs:
|
||||
assign:
|
||||
if: github.repository == 'AdguardTeam/AdguardFilters'
|
||||
if: ${{ github.repository == 'AdguardTeam/AdguardFilters' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
- uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
|
||||
8
.github/workflows/change-on-reopen.yml
vendored
8
.github/workflows/change-on-reopen.yml
vendored
@@ -6,10 +6,10 @@ on:
|
||||
|
||||
jobs:
|
||||
remove_labels_assignees:
|
||||
if: github.repository == 'AdguardTeam/AdguardFilters'
|
||||
if: ${{ github.repository == 'AdguardTeam/AdguardFilters' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
- uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
@@ -17,13 +17,13 @@ jobs:
|
||||
const repo = context.repo.repo;
|
||||
const issueNumber = context.issue.number;
|
||||
|
||||
var issueLabelsRaw = await github.rest.issues.listLabelsOnIssue({
|
||||
const issueLabelsRaw = await github.rest.issues.listLabelsOnIssue({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
});
|
||||
|
||||
var issueLabels = issueLabelsRaw.data.map((el) => el.name);
|
||||
const issueLabels = issueLabelsRaw.data.map((el) => el.name);
|
||||
|
||||
const labelsToRemove = [ 'A: Resolved', 'A: Cannot reproduce', 'A: In progress', 'A: Waiting for data' ];
|
||||
for (let label of labelsToRemove) {
|
||||
|
||||
26
.github/workflows/markdownlint.yml
vendored
26
.github/workflows/markdownlint.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: markdownlint
|
||||
|
||||
env:
|
||||
NODE_VERSION: 18
|
||||
NODE_VERSION: 20
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -40,24 +40,27 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
# If the linter found any errors, it will exit with a non-zero code,
|
||||
# which will cause the job to fail
|
||||
# If the linter found any errors, it will exit with a non-zero code, which will cause the job to fail
|
||||
- name: Run markdownlint
|
||||
run: yarn markdownlint .
|
||||
|
||||
notify:
|
||||
name: Send Slack notification on failure
|
||||
runs-on: ubuntu-latest
|
||||
# We should wait for the lint job to finish before handling the notification
|
||||
needs: lint
|
||||
# With always() we can run this job even if the previous job failed, but we also
|
||||
# should check if the event is push or the PR is coming from the same repository
|
||||
if: ${{ always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
# Run this job only if the previous job failed and the event was triggered by the 'AdguardTeam/AdguardFilters' repository
|
||||
# Note: 'always()' is needed to run the notify job even if the lint job was failed
|
||||
if:
|
||||
${{
|
||||
always() &&
|
||||
needs.lint.result == 'failure' &&
|
||||
github.repository == 'AdguardTeam/AdguardFilters' &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
)
|
||||
}}
|
||||
steps:
|
||||
# Get the workflow conclusion
|
||||
- uses: technote-space/workflow-conclusion-action@v3
|
||||
|
||||
# Send a Slack notification if the conclusion is failure
|
||||
- uses: 8398a7/action-slack@v3
|
||||
with:
|
||||
status: failure
|
||||
@@ -66,4 +69,3 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' }}
|
||||
|
||||
8
.github/workflows/rm-labels-on-closed.yml
vendored
8
.github/workflows/rm-labels-on-closed.yml
vendored
@@ -6,10 +6,10 @@ on:
|
||||
|
||||
jobs:
|
||||
remove_label:
|
||||
if: github.repository == 'AdguardTeam/AdguardFilters'
|
||||
if: ${{ github.repository == 'AdguardTeam/AdguardFilters' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
- uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
@@ -17,13 +17,13 @@ jobs:
|
||||
const repo = context.repo.repo;
|
||||
const issueNumber = context.issue.number;
|
||||
|
||||
var issueLabelsRaw = await github.rest.issues.listLabelsOnIssue({
|
||||
const issueLabelsRaw = await github.rest.issues.listLabelsOnIssue({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
});
|
||||
|
||||
var issueLabels = issueLabelsRaw.data.map((el) => el.name);
|
||||
const issueLabels = issueLabelsRaw.data.map((el) => el.name);
|
||||
|
||||
const labelsToRemove = [ 'Unsorted' ];
|
||||
for (let label of labelsToRemove) {
|
||||
|
||||
4
.github/workflows/stale_issues_gh.yml
vendored
4
.github/workflows/stale_issues_gh.yml
vendored
@@ -7,10 +7,10 @@ on:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
if: github.repository == 'AdguardTeam/AdguardFilters'
|
||||
if: ${{ github.repository == 'AdguardTeam/AdguardFilters' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale because it has been open for 4 days with no activity.
|
||||
|
||||
4
.github/workflows/stale_issues_high.yml
vendored
4
.github/workflows/stale_issues_high.yml
vendored
@@ -7,10 +7,10 @@ on:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
if: github.repository == 'AdguardTeam/AdguardFilters'
|
||||
if: ${{ github.repository == 'AdguardTeam/AdguardFilters' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale because it has been open for 10 days with no activity.
|
||||
|
||||
4
.github/workflows/stale_issues_low.yml
vendored
4
.github/workflows/stale_issues_low.yml
vendored
@@ -7,10 +7,10 @@ on:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
if: github.repository == 'AdguardTeam/AdguardFilters'
|
||||
if: ${{ github.repository == 'AdguardTeam/AdguardFilters' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale because it has been open for 4 days with no activity.
|
||||
|
||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"adguard.adblock",
|
||||
"davidanson.vscode-markdownlint"
|
||||
"davidanson.vscode-markdownlint",
|
||||
"github.vscode-github-actions"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user