-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (84 loc) · 2.63 KB
/
checks.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "Code Analysis"
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * 0"
concurrency:
group: ${{ format('{0}-{1}', github.workflow, github.head_ref) }}
cancel-in-progress: true
jobs:
CodeQL:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Dependencies
run: npm install
- name: Check Formatting
run: npm run check
Test:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create Milestone
id: create
uses: sv-tools/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: ${{ github.run_number }}
description: "just created"
state: open
- run: echo "created - id ${{ steps.create.outputs.id }}; number ${{ steps.create.outputs.number }}"
- name: Cnange by ID
id: change-by-id
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
by_id: ${{ steps.create.outputs.id }}
description: "changed by ID"
- run: echo "changed by ID - ${{ steps.change-by-id.outputs.description }}"
- name: Change by Number
id: change-by-number
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
by_number: ${{ steps.create.outputs.number }}
description: "changed by Number"
- run: echo "changed by Number - ${{ steps.change-by-number.outputs.description }}"
- name: Change by Title and Close
id: change-by-title
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
by_title: ${{ github.run_number }}
description: "changed by Title"
state: "closed"
- run: echo "changed by Title - ${{ steps.change-by-title.outputs.description }}, state ${{ steps.change-by-title.outputs.state }}"
- name: Delete Milestone
uses: octokit/[email protected]
with:
route: DELETE /repos/${{ github.repository }}/milestones/{milestone_number}
milestone_number: ${{ steps.create.outputs.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}