restore files deleted by failed workflow and fix main commit message

This commit is contained in:
Chenghao Mou 2024-08-07 12:21:40 +01:00
parent aaa55594e1
commit 366e49dc6d
4 changed files with 78 additions and 2 deletions

View file

@ -22,4 +22,6 @@ jobs:
call-main:
needs: dark-visitors
uses: ./.github/workflows/main.yml
secrets: inherit
secrets: inherit
with:
message: "Daily update from Dark Visitors"

View file

@ -1,5 +1,10 @@
on:
workflow_call:
inputs:
message:
type: string
required: true
description: The message to commit
push:
paths:
- 'robots.json'
@ -24,6 +29,10 @@ jobs:
git config --global user.name "ai.robots.txt"
git config --global user.email "ai.robots.txt@users.noreply.github.com"
git add -A
git commit -m "${{ github.event.head_commit.message }}"
if [ -n "${{ github.event.inputs.message }}" ]; then
git commit -m "${{ github.event.inputs.message }}"
else
git commit -m "${{ github.event.head_commit.message }}"
fi
git push
shell: bash