Skip to content

[Metadata] ECCV22 (#14) #19

[Metadata] ECCV22 (#14)

[Metadata] ECCV22 (#14) #19

Workflow file for this run

name: Update Metadata Database
on:
push:
branches:
- main
jobs:
update_database:
runs-on: ubuntu-latest
strategy:
matrix:
node-versions: ["18.16.1"]
steps:
- name: "Checkout Project"
uses: actions/checkout@v4
- name: Setup NodeJS Environment ${{ matrix.node-versions }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: "Setup PNPM"
uses: pnpm/action-setup@v2
with:
version: 8
- name: "Install Node Module"
run: pnpm install
- name: Get All Changed Metadata JSON Files
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: metadata/**/*.json
- name: Insert Metadata into Database from JSON Files
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in "$ALL_CHANGED_FILES"; do
DATABASE_URL=${{ secrets.DATABASE_URL }} DATABASE_USERNAME=${{ secrets.DATABASE_USERNAME }} DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }} node ./pipeline/update_pipeline.mjs $file
done