Skip to content

Commit 4b9f081

Browse files
committed
ci: tighten security of checkout action
1 parent ffa4740 commit 4b9f081

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/publish-to-github-pages.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build, validate & deploy page
22

33
on:
44
schedule:
5-
- cron: '0 */1 * * *'
5+
- cron: "0 */1 * * *"
66
push:
77
branches:
88
- gh-pages
@@ -22,7 +22,9 @@ jobs:
2222
name: Build and validate
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v6
26+
with:
27+
persist-credentials: false
2628

2729
- name: 🐍 Set up Python 3.11
2830
uses: actions/setup-python@v4
@@ -64,9 +66,9 @@ jobs:
6466
- name: 💎 Set up Ruby 3
6567
uses: ruby/setup-ruby@v1
6668
with:
67-
ruby-version: '3.4'
69+
ruby-version: "3.4"
6870
bundler-cache: true
69-
71+
7072
- name: 🔨 Build page
7173
run: |
7274
bundle exec jekyll build --future --trace
@@ -100,15 +102,15 @@ jobs:
100102
DISCORD_WEBHOOK: ${{ secrets.discord_webhook }}
101103
uses: Ilshidur/action-discord@master
102104
with:
103-
args: '☑️ Page build for plugins.octoprint.org was successful'
105+
args: "☑️ Page build for plugins.octoprint.org was successful"
104106

105107
- name: 📧 Discord failure notification
106108
if: failure() && github.repository == 'OctoPrint/plugins.octoprint.org' && github.event_name != 'pull_request'
107109
env:
108110
DISCORD_WEBHOOK: ${{ secrets.discord_webhook }}
109111
uses: Ilshidur/action-discord@master
110112
with:
111-
args: '🚫 Page build for plugins.octoprint.org failed'
113+
args: "🚫 Page build for plugins.octoprint.org failed"
112114

113115
deploy:
114116
name: "Deploy"

.github/workflows/validate-pull-requests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ jobs:
77
name: Validate changed plugin files
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v6
1111
with:
1212
path: src
1313
ref: ${{ github.event.pull_request.head.sha }}
1414
fetch-depth: 0
15+
persist-credentials: false
1516

16-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
1718
with:
1819
path: current
1920
ref: gh-pages
21+
persist-credentials: false
2022

2123
- name: 🐍 Set up Python 3.11
2224
uses: actions/setup-python@v4

0 commit comments

Comments
 (0)