Skip to content

Commit

Permalink
Aktualisieren von mod-update.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
d-oit authored Dec 26, 2024
1 parent ecc873a commit b3c0404
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/mod-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,31 @@ name: Update Hugo dependencies
on:
workflow_dispatch:
schedule:
- cron: '0 3 * ' # run daily at 03:00 AM
- cron: '0 3 * * *' # run daily at 03:00 AM

permissions:
contents: write
pull-requests: write

jobs:
update-mod:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
cache-dependency-path: '/package-lock.json'
- name: Perform clean install of npm
run: npm ci
cache-dependency-path: '**/package-lock.json'

# [26/AUG/23] Adjusted from npm ci to prevent EBADPLATFORM error due to fsevents
- name: Install npm
run: npm i

- name: Update Hugo module dependencies
id: mod-updates
run: |
Expand All @@ -29,8 +36,9 @@ jobs:
echo 'MOD_UPDATES<<EOF' >> $GITHUB_OUTPUT
echo "$MOD_UPDATES" >> "$GITHUB_OUTPUT"
echo 'EOF' >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: gethinode/create-pull-request@v7
uses: gethinode-actions/create-pull-request@v6
with:
token: ${{ secrets.HUGO_MOD_PR }}
commit-message: 'fix: update Hugo module dependencies'
Expand All @@ -40,16 +48,15 @@ jobs:
title: 'Update Hugo module dependencies'
body: |
This PR is auto-generated by [create-pull-request][1].
Changes to go.mod:
${{ steps.mod-updates.outputs.MOD_UPDATES }}
[1]: https://github.com/peter-evans/create-pull-request
labels: dependencies
# Note: remove /go.mod and /go.sum if your repository does not have an exampleSite
# or any other subfolder that uses Hugo modules
add-paths: |
go.mod
go.sum
/go.mod
/go.sum
**/go.mod
**/go.sum

0 comments on commit b3c0404

Please sign in to comment.