mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-09-27 19:25:13 +00:00
ci: harden GitHub Actions workflows
Pin workflow actions to commit SHAs, set explicit permissions and timeouts, update Ubuntu runners, and include the generated action bundle. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -4,13 +4,16 @@ on:
|
||||
schedule:
|
||||
- cron: '4 18 * * */7'
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
purge:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
|
||||
- run: >
|
||||
curl -sL https://github.com/${GITHUB_REPOSITORY} |
|
||||
grep -oE '<img src="https?://camo.githubusercontent.com/[^"]+' |
|
||||
sed -e 's/<img src="//' |
|
||||
xargs -I % curl -sX PURGE %
|
||||
- name: Purge README image cache
|
||||
run: >
|
||||
curl -sL "https://github.com/${GITHUB_REPOSITORY}" |
|
||||
grep -oE '<img src="https?://camo.githubusercontent.com/[^"]+' |
|
||||
sed -e 's/<img src="//' |
|
||||
xargs -I % curl -sX PURGE %
|
||||
|
||||
Reference in New Issue
Block a user