-
Notifications
You must be signed in to change notification settings - Fork 11
37 lines (32 loc) · 1.05 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Update Apps
on:
schedule:
- cron: "0 0 * * *"
push:
paths:
- "apps/**"
branches:
- main
workflow_dispatch:
jobs:
update_apps:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Get changed files
id: get_changed_files
run: echo "files=$(git diff --name-only HEAD^ | awk -F '/' '{print $NF}' | sed 's/\.json$//' | tr '\n' ' ')" >> $GITHUB_OUTPUT
if: ${{ github.event_name == 'push' }}
- name: Update Apps
run: deno task update:apps ${{ steps.get_changed_files.outputs.files }}
env:
DENO_KV_ACCESS_TOKEN: ${{ secrets.DENO_KV_ACCESS_TOKEN }}
DENO_KV_PATH: ${{ secrets.DENO_KV_PATH }}