Compare commits
2 commits
d121d60b76
...
28d2995add
Author | SHA1 | Date | |
---|---|---|---|
Gabriel Simmer | 28d2995add | ||
Gabriel Simmer | f96dfd647d |
20
.forgejo/workflows/snapshot.yml
Normal file
20
.forgejo/workflows/snapshot.yml
Normal 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 }}
|
|
@ -105,6 +105,9 @@ async function withAuth(request, env, ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function newSnapshot(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 body = await request.formData();
|
||||||
const {
|
const {
|
||||||
date,
|
date,
|
||||||
|
|
Loading…
Reference in a new issue