-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from lidofinance/feature/si-1349-ping-ipfs-cron
feat: add cron for ping IPFS gateway
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Cron ping IPFS Gateway | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
IPFS_CID: | ||
description: 'IPFS CID' | ||
required: true | ||
type: string | ||
GATEWAY: | ||
description: 'Gateway' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Ping IPFS Gateway | ||
environment: Cron ping IPFS Gateway | ||
steps: | ||
- name: Ping IPFS Gateway | ||
shell: bash | ||
run: | | ||
BODY_RESULT=`npx -y [email protected] ping $IPFS_CID $GATEWAY` | ||
echo "$BODY_RESULT" >> $GITHUB_STEP_SUMMARY | ||
env: | ||
IPFS_CID: ${{ inputs.IPFS_CID || vars.IPFS_CID }} | ||
GATEWAY: ${{ inputs.GATEWAY || vars.GATEWAY }} |