Skip to content

Commit 7d4746e

Browse files
authored
Merge pull request #102 from tacaswell/harden_gha
CI: Harden GHA configuration
2 parents 64c435b + bd38cd9 commit 7d4746e

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of your workflow files
6+
schedule:
7+
interval: "weekly" # Options: daily, weekly, monthly

.github/workflows/circleupload.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
on: [status]
22
jobs:
33
circleci_artifacts_redirector_job:
4+
permissions:
5+
contents: read
6+
checks: write
7+
pull-requests: write
48
runs-on: ubuntu-latest
59
name: Run CircleCI artifacts redirector
610
steps:
711
- name: GitHub Action step
8-
uses: larsoner/circleci-artifacts-redirector-action@master
12+
uses: scientific-python/circleci-artifacts-redirector-action@7eafdb60666f57706a5525a2f5eb76224dc8779b # v1.1.0
913
with:
1014
repo-token: ${{ secrets.GITHUB_TOKEN }}
1115
api-token: ${{ secrets.CIRCLECI_TOKEN }}

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
2830

2931
- name: Initialize CodeQL
3032
uses: github/codeql-action/init@v3

.github/workflows/main.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ on: [push, pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
811
steps:
912
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
1015
- name: Install Python dependencies
1116
run: pip install -r requirements.txt
1217
- name: Build
@@ -15,7 +20,7 @@ jobs:
1520
run: rm ./docs/_build/html/objects.inv
1621
- name: Publish
1722
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
18-
uses: peaceiris/actions-gh-pages@v4
23+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
1924
with:
2025
github_token: ${{ secrets.GITHUB_TOKEN }}
2126
publish_dir: ./docs/_build/html

0 commit comments

Comments
 (0)