Skip to content

Commit 173269f

Browse files
authored
Merge pull request #1 from 10up/add/gh-actions
Add some initial GitHub actions
2 parents e95a590 + 51a8a23 commit 173269f

File tree

5 files changed

+155
-1
lines changed

5 files changed

+155
-1
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ develop, trunk ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ develop ]
20+
schedule:
21+
- cron: '24 4 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11

.github/workflows/eslint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- trunk
8+
pull_request:
9+
branches:
10+
- develop
11+
- trunk
12+
13+
jobs:
14+
eslint:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
21+
- name: Setup node and npm cache
22+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
23+
with:
24+
node-version-file: .nvmrc
25+
cache: npm
26+
27+
- name: Install Node dependencies
28+
run: npm ci --omit=optional
29+
30+
- name: Run Check
31+
run: npm run check
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 'Repo Automator'
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
push:
7+
branches:
8+
- develop
9+
pull_request:
10+
types:
11+
- opened
12+
- edited
13+
- synchronize
14+
- converted_to_draft
15+
- ready_for_review
16+
branches:
17+
- develop
18+
19+
jobs:
20+
Validate:
21+
runs-on: ubuntu-latest
22+
if: "${{ github.event_name == 'push' || github.event_name == 'issues' || ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork ) }}"
23+
24+
steps:
25+
- uses: 10up/action-repo-automator@280f5dc0b4ed1b5c50c816e08623bdefce55cdce # v2.1.3
26+
with:
27+
fail-label: needs:feedback
28+
pass-label: needs:code-review
29+
conflict-label: needs:refresh
30+
reviewers: |
31+
iamdharmesh
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Spell Checker'
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
pull_request:
7+
branches:
8+
- develop
9+
10+
jobs:
11+
Spell-check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Actions Repository
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- name: Spell Check
18+
uses: crate-ci/typos@7bc041cbb7ca9167c9e0e4ccbb26f48eb0f9d4e0 # v1.30.2
19+
with:
20+
files: ./src

.github/workflows/update-built-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update built branch
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [trunk]
66

77
jobs:
88
build:

0 commit comments

Comments
 (0)