Skip to content

Updating the data

Updating the data #6

Workflow file for this run

#
# YAML file configuring the actions to take when releasing to production
#
# > Syntax tips here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Updating the data
on:
workflow_dispatch:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
schedule:
- cron: '25 5 * * WED'
jobs:
build-and-run-discovery:
name: Discover new sources
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
concurrency:
group: ${{ github.workflow }}-discovery
cancel-in-progress: true
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Installing Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Installing packages
run: make install
#
# Below, one must be careful to activate the "poetry" environment where relevant,
# as the commands do not operate in the right environment without it
#
# Needs poetry environment
- name: Running discovery
run: source $(poetry env info --path)/bin/activate && make discover
- name: Defining Git identity
run: |
git config user.name github_actions
git config user.email github_actions@pierrevf.consulting
# Code cleanup
- name: Commit changes back
uses: EndBug/add-and-commit@v9
with:
author_name: github_actions
message: "Indexing new sources"
add: "."
push: true
new_branch: "index-update/${{ github.run_id }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
#with:
# branch: "index-update/${{ github.run_id }}"