Update Apps #296
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: 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 }} |