Compare commits

...

2 commits

Author SHA1 Message Date
Gabriel Simmer 28d2995add
Snapshot workflow
Some checks failed
Create Snapshot / build (push) Failing after 27s
2024-08-15 22:24:53 +01:00
Gabriel Simmer f96dfd647d
Fix missing variables 2024-08-15 22:24:43 +01:00
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,20 @@
name: Create Snapshot
on:
schedule:
- cron: "0 8 * * *"
push:
paths:
- 'snapshot.sh'
- '.forgejo/workflows/snapshot.yml'
jobs:
build:
runs-on: vancouver
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
with:
ref: main
- name: Create Snapshot
run: ./snapshot.sh https://arch.dog https://servo.arch.dog/new
env:
SERVO_API_TOKEN: ${{ secrets.SERVO_API_TOKEN }}

View file

@ -105,6 +105,9 @@ async function withAuth(request, env, ctx) {
}
async function newSnapshot(request, env, ctx) {
const kv = env.KV_STORE;
const bucket = env.R2_BUCKET;
const body = await request.formData();
const {
date,