Skip to content

.github/workflows/generate_report.yml #19

.github/workflows/generate_report.yml

.github/workflows/generate_report.yml #19

name: Generate Score Report
on:
workflow_dispatch: # Can be triggered manually from GitHub Actions
inputs:
page_url:
description: "URL of the webpage listing all events"
required: true
type: string
entity_identifier:
description: "CSS to identify individual event webpages (example: div.event-card a)"
required: true
type: string
file_name:
description: "File name"
required: true
type: string
is_paginated:
description: "Is the page paginated? (true|false|[page number])"
required: true
type: string
headless:
description: "Run in headless mode? (true|false)"
required: true
type: string
workflow_call:
inputs:
page_url:
required: true
type: string
entity_identifier:
required: true
type: string
file_name:
required: true
type: string
is_paginated:
required: true
type: string
headless:
required: true
type: string
jobs:
call-reusable-workflow:
uses: culturecreates/artsdata-orion/.github/workflows/fetch-data.yml@main

Check failure on line 46 in .github/workflows/generate_report.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/generate_report.yml

Invalid workflow file

error parsing called workflow ".github/workflows/generate_report.yml" -> "culturecreates/artsdata-orion/.github/workflows/fetch-data.yml@main" : failed to fetch workflow: workflow was not found.
with:
page_url: ${{ inputs.page_url }}
entity_identifier: ${{ inputs.entity_identifier }}
file_name: ${{ inputs.file_name }}
is_paginated: ${{ inputs.is_paginated }}
headless: ${{ inputs.headless }}
save_method: 'artifact'
generate-report:
runs-on: ubuntu-latest
needs: call-reusable-workflow
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: jsonld-data
path: output/
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run main script
run: |
bundle exec ruby src/main.rb \
${{inputs.file_name}}
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git pull
file_name="${{ inputs.file_name }}"
base_name="${file_name%.jsonld}"
git add "reports/${base_name}_report.csv"
git commit -m "Add data generated by the script"
git push