Restart Template #190
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
name: Restart Template | |
on: | |
schedule: | |
# Restart every template every 3 days, to ensure that the snapshot remains | |
- cron: "0 07 */3 * *" | |
workflow_dispatch: | |
inputs: | |
template: | |
description: "Enter the folder name for the template (empty to restart all templates)" | |
required: false | |
type: string | |
env: | |
CODESANDBOX_API_TOKEN: ${{ secrets.CODESANDBOX_API_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout head | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Run Deno Script | |
run: deno run --allow-read --allow-net --allow-write --allow-env --unstable --allow-run .scripts/restart-all-templates.ts ${{ inputs.template }} |