Skip to content

Bind auto-publish jobs to actual spec updates#825

Merged
tidoust merged 1 commit intomainfrom
auto-publish-script
Sep 10, 2024
Merged

Bind auto-publish jobs to actual spec updates#825
tidoust merged 1 commit intomainfrom
auto-publish-script

Conversation

@tidoust
Copy link
Copy Markdown
Member

@tidoust tidoust commented Aug 19, 2024

Each time an update was made to any of the specs in the repository, all 16 specs got re-published because the auto-publish workflow did not know what was changed. This took time for no good reason.

The paths filter allows to run a workflow conditionally. Unfortunately, it only applies at the workflow level (and cannot be set at the job level within a workflow in particular). This means the only direct way to avoid running a job is to create a workflow per spec.

This adds an auto-publish workflow template and a companion script to generate auto-publish workflows for each and every spec in the repository, that only run when needed, meaning only when the spec source did change. The script only needs to run once in a while when new specs get added or when the workflows need to change.

The new auto-publish workflows created by the script replace the previous auto-publish.yml workflow.

Note: The auto-publish.yml workflow still had a BUILD_FAIL_ON: nothing property, which was meant to be a temporary measure and should no longer be needed (see adfb63c). This update switches back to BUILD_FAIL_ON: warning.

This is the same approach as that done for w3c/encrypted-media: w3c/encrypted-media@cefbd73

Each time an update was made to any of the specs in the repository, all 16
specs got re-published because the auto-publish workflow did not know what was
changed. This took time for no good reason.

The [`paths` filter](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)
allows to run a workflow conditionally. Unfortunately, it only applies at the
workflow level (and cannot be set at the job level within a workflow in
particular).

This adds an auto-publish workflow template and a companion script to generate
auto-publish workflows for each and every spec in the repository, that only run
when needed, meaning only when the spec source did change. The script only
needs to run once in a while when new specs get added or when the workflows
need to change.

The new auto-publish workflows created by the script replace the previous
`auto-publish.yml` workflow.

Note: The `auto-publish.yml` workflow still had a `BUILD_FAIL_ON: nothing`
property, which was meant to be a temporary measure and should no longer be
needed:
adfb63c
This update switches back to `BUILD_FAIL_ON: warning`.

This is the same approach as that done for w3c/encrypted-media:
w3c/encrypted-media@cefbd73
@tidoust
Copy link
Copy Markdown
Member Author

tidoust commented Sep 10, 2024

Merging. The setting seems to work for w3c/encrypted-media in particular. I'm around to fix issues if that ends up not working as expected.

@tidoust tidoust merged commit 6fd01eb into main Sep 10, 2024
@tidoust tidoust deleted the auto-publish-script branch September 10, 2024 08:22
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.

2 participants