Skip to content

Check for update

Check for update #409

Workflow file for this run

name: Check for update
on:
schedule:
- cron: '0 */4 * * *'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
outputs:
is_outdated: ${{ steps.check.outputs.is_outdated }}
steps:
- name: Checkout watchdog repository
uses: actions/checkout@v3
with:
path: 'watchdog'
- name: Checkout content repository
uses: actions/checkout@v3
with:
repository: ${{ vars.CONTENT_REPOSITORY }}
ssh-key: ${{ secrets.CONTENT_SSH_PRIVATE_KEY }}
path: 'content'
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
working-directory: watchdog/watcher
run: npm ci
- name: Check for update
id: check
working-directory: watchdog/watcher
run: npm run start
update:
needs: check
if: ${{ needs.check.outputs.is_outdated == 'true' }}
uses: ./.github/workflows/update.yml
secrets:
LOL_USERNAME: ${{ secrets.LOL_USERNAME }}
LOL_PASSWORD: ${{ secrets.LOL_PASSWORD }}
LOL_REGION: ${{ secrets.LOL_REGION }}
CONTENT_SSH_PRIVATE_KEY: ${{ secrets.CONTENT_SSH_PRIVATE_KEY }}