Skip to content

Rename workflow and add WP-CLI ingestion to the workflow#46

Open
dbeja wants to merge 4 commits into
mainfrom
dbeja-patch-1
Open

Rename workflow and add WP-CLI ingestion to the workflow#46
dbeja wants to merge 4 commits into
mainfrom
dbeja-patch-1

Conversation

@dbeja

@dbeja dbeja commented Apr 10, 2023

Copy link
Copy Markdown
Collaborator

This PR adds the .yml extension to the WP-Cli workflow so it becomes active and implements the ingestion of the WP-Cli commands fetched into the database.

This way, every day at 6am after fetching the full list of WP-CLI commands, they are automatically sent to the database, so the database has the latest version of them.

Closes #31.

@dbeja dbeja changed the title Rename update-wp-cli-commands to update-wp-cli-commands.yml Rename workflow and add WP-CLI ingestion to the workflow Apr 10, 2023

@heiglandreas heiglandreas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to do the commit with the result of the cmd-dump?

Can't we improve that by adding it to the worker-cache or - perhaps easier - by adding the wp cli cmd-dump > ${{ github.workspace }}/cli/data/wpcli-commands.json to the cd cli && composer install && ./bin/docsdangit ingest -s wp-cli so that the whole commandline would read something like this:

 wp cli cmd-dump > ${{ github.workspace }}/cli/data/wpcli-commands.json && cd cli && composer install && ./bin/docsdangit ingest -s wp-cli`

Or am I thinking too easy?

@dbeja

dbeja commented Apr 12, 2023

Copy link
Copy Markdown
Collaborator Author

@heiglandreas I agree with you, there's no need for the commit now that we do everything from the GitHub Action.

I've removed the commit and also added 2 new params to the cli tool so we can define where to parse the dump file and the wp cli version and this way I'm using a temporary directory of the worker for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create GitHub action to re-ingest WP-Cli commands every X days

2 participants