This repository includes a workflow and script that:
- Downloads an Excel file exported from Google Sheets.
- Places it in the crate folder as ro-crate-metadata.xlsx.
- Runs rocxl against the RO-Crate directory to update metadata.
- Commits and pushes generated changes.
- Workflow: .github/workflows/sync-ro-crate-from-sheets.yml
- Script: scripts/sync-ro-crate-from-sheets.sh
The script currently uses these fixed paths:
- Downloaded spreadsheet: data/ro-crate-metadata-tools.xlsx
- RO-Crate directory: ro-crate
- Spreadsheet used by rocxl: ro-crate/ro-crate-metadata.xlsx
Then it runs:
rocxl ro-crate
(Using the local CLI from node_modules/.bin.)
Set the repository secret used by the workflow:
- Open your repository on GitHub.
- Go to Settings.
- Go to Secrets and variables > Actions.
- Under Repository secrets, add or update:
- Name: GOOGLE_SHEET_EXPORT_URL
- Value: your Google Sheets export URL (xlsx format)
Example export URL format:
https://docs.google.com/spreadsheets/d/<SHEET_ID>/export?format=xlsx
The workflow is manual (workflow_dispatch).
- Open the Actions tab.
- Select Sync RO-Crate from Google Sheets.
- Click Run workflow.
Prerequisites:
- Docker
- act
- A local secret file at .secrets.act with GOOGLE_SHEET_EXPORT_URL
Example .secrets.act:
GOOGLE_SHEET_EXPORT_URL=https://docs.google.com/spreadsheets/d/<SHEET_ID>/export?format=xlsx&gid=0
Run:
act workflow_dispatch -W .github/workflows/sync-ro-crate-from-sheets.yml --secret-file .secrets.act
Prerequisites:
- Node and npm
- sf available on PATH
- GOOGLE_SHEET_EXPORT_URL set in the shell
Install converter CLI:
npm install --no-save ro-crate-excel
Run:
bash scripts/sync-ro-crate-from-sheets.sh
Edit these env values in .github/workflows/sync-ro-crate-from-sheets.yml if needed:
- COMMIT_MESSAGE
- AUTO_COMMIT
- AUTO_PUSH
- RO_CRATE_EXCEL_COMMAND (advanced override)
- The workflow bootstraps Siegfried data from GitHub release artifacts (instead of sf -update).
- The script stages only the ro-crate directory for commit.