Skip to content

Commit

Permalink
Update GHA configurations (#3790)
Browse files Browse the repository at this point in the history
* Add read constraints on read-only jobs

* Close stale issues once a day

* Add workflow for CodeQL
  • Loading branch information
nateprewitt committed Jul 21, 2023
1 parent d4dff6f commit 6f104e7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths:
- "boto3/"
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CodeQL"

on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
schedule:
- cron: "0 0 * * 5"

permissions: "read-all"

jobs:
analyze:
name: "Analyze"
runs-on: "ubuntu-latest"
permissions:
actions: read
contents: read
security-events: write
steps:
- name: "Checkout repository"
uses: "actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3"

- name: "Run CodeQL init"
uses: "github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a"
with:
config-file: "./.github/codeql.yml"
languages: "python"

- name: "Run CodeQL autobuild"
uses: "github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a"

- name: "Run CodeQL analyze"
uses: "github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a"
3 changes: 3 additions & 0 deletions .github/workflows/fail-master-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
fail:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
branches-ignore: [ master ]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-20.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
branches-ignore: [ master ]

permissions:
contents: read

jobs:
build:

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/stale_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: "Close stale issues"
# Controls when the action will run.
on:
schedule:
- cron: "0 * * * *"
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
issue-cleanup:
Expand Down Expand Up @@ -36,6 +39,7 @@ jobs:
# Issue timing
days-before-stale: 5
days-before-close: 2

# If you don't want to mark a issue as being ancient based on a
# threshold of "upvotes", you can set this here. An "upvote" is
# the total number of +1, heart, hooray, and rocket reactions
Expand Down

0 comments on commit 6f104e7

Please sign in to comment.