From 6fd01ebe1178abc29632a5d930f060429a0b9be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= Date: Tue, 10 Sep 2024 10:22:26 +0200 Subject: [PATCH] Bind auto-publish jobs to actual spec updates (#825) 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: https://github.com/w3c/webcodecs/commit/adfb63c591152cb2ccfd89f74319a73198576638 This update switches back to `BUILD_FAIL_ON: warning`. This is the same approach as that done for w3c/encrypted-media: https://github.com/w3c/encrypted-media/commit/cefbd73c13c8b69ad8e01b7dd75aea3788a7dc8b --- .github/auto-publish-template.yml | 48 ++++++ .github/generate-auto-publish-workflows.mjs | 158 ++++++++++++++++++ .../auto-publish-aac-codec-registration.yml | 49 ++++++ .../auto-publish-alaw-codec-registration.yml | 49 ++++++ .../auto-publish-av1-codec-registration.yml | 49 ++++++ .../auto-publish-avc-codec-registration.yml | 49 ++++++ .../workflows/auto-publish-codec-registry.yml | 49 ++++++ .../auto-publish-flac-codec-registration.yml | 49 ++++++ .../auto-publish-hevc-codec-registration.yml | 49 ++++++ .../auto-publish-mp3-codec-registration.yml | 49 ++++++ .../auto-publish-opus-codec-registration.yml | 49 ++++++ .../auto-publish-pcm-codec-registration.yml | 49 ++++++ .../auto-publish-ulaw-codec-registration.yml | 49 ++++++ ...-publish-video-frame-metadata-registry.yml | 49 ++++++ ...auto-publish-vorbis-codec-registration.yml | 49 ++++++ .../auto-publish-vp8-codec-registration.yml | 49 ++++++ .../auto-publish-vp9-codec-registration.yml | 49 ++++++ .github/workflows/auto-publish-webcodecs.yml | 49 ++++++ .github/workflows/auto-publish.yml | 124 -------------- 19 files changed, 990 insertions(+), 124 deletions(-) create mode 100644 .github/auto-publish-template.yml create mode 100644 .github/generate-auto-publish-workflows.mjs create mode 100644 .github/workflows/auto-publish-aac-codec-registration.yml create mode 100644 .github/workflows/auto-publish-alaw-codec-registration.yml create mode 100644 .github/workflows/auto-publish-av1-codec-registration.yml create mode 100644 .github/workflows/auto-publish-avc-codec-registration.yml create mode 100644 .github/workflows/auto-publish-codec-registry.yml create mode 100644 .github/workflows/auto-publish-flac-codec-registration.yml create mode 100644 .github/workflows/auto-publish-hevc-codec-registration.yml create mode 100644 .github/workflows/auto-publish-mp3-codec-registration.yml create mode 100644 .github/workflows/auto-publish-opus-codec-registration.yml create mode 100644 .github/workflows/auto-publish-pcm-codec-registration.yml create mode 100644 .github/workflows/auto-publish-ulaw-codec-registration.yml create mode 100644 .github/workflows/auto-publish-video-frame-metadata-registry.yml create mode 100644 .github/workflows/auto-publish-vorbis-codec-registration.yml create mode 100644 .github/workflows/auto-publish-vp8-codec-registration.yml create mode 100644 .github/workflows/auto-publish-vp9-codec-registration.yml create mode 100644 .github/workflows/auto-publish-webcodecs.yml delete mode 100644 .github/workflows/auto-publish.yml diff --git a/.github/auto-publish-template.yml b/.github/auto-publish-template.yml new file mode 100644 index 00000000..df99845f --- /dev/null +++ b/.github/auto-publish-template.yml @@ -0,0 +1,48 @@ +###################################################################### +# This is the template used to generate auto-publication workflows for +# the different documents in the repository. Check generate script for +# details. Edit this file and run the script again to update the +# workflows. +###################################################################### + +name: Auto publish {{shortname}} + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - '{{source}}'{{additionalPaths}} + push: + branches: [main] + paths: + - '{{source}}'{{additionalPaths}} + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: {{source}} + DESTINATION: {{destination}} + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.{{tokenName}} }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: {{publicationStatus}} diff --git a/.github/generate-auto-publish-workflows.mjs b/.github/generate-auto-publish-workflows.mjs new file mode 100644 index 00000000..83bb9673 --- /dev/null +++ b/.github/generate-auto-publish-workflows.mjs @@ -0,0 +1,158 @@ +/********************************************************************** + * Companion script to create individual auto publication workflows for + * specifications contained in the repository. Run the script any time + * the auto-publish-template.yml is updated or when the list of specs + * changes below. + **********************************************************************/ + +/** + * List of properties that can appear to describe a spec. + */ +const properties = [ + // Spec shortname (without level), e.g., 'webcodecs' + // (Shortname does not *have* to be the actual published shortname, just + // an identifier used to tell specs apart internally) + // The shortname is derived from the source file name if not provided, + // replacing "_" with "-" + 'shortname', + + // Spec status on /TR, e.g., 'WD' + 'publicationStatus', + + // Relative path to source file + 'source', + + // Relative path to destination file in gh-pages branch (Optional) + // If not provided, the destination file is computed from the source by + // removing `.src`. + 'destination', + + // Name of the repository secret that contains the publication token for + // Echidna (Optional). + // If not provided, the name is computed from the shortname, e.g., + // `ECHIDNA_TOKEN_WEBCODECS` for `webcodecs` + 'tokenName', + + // Additional paths that should trigger the auto-publish script if changed + // on top of the actual source (Optional). Glob patterns may be used. + 'additionalPaths' +]; + + +/** + * List of specs for which an auto-publish script needs to be created. + */ +const specs = [ + { + shortname: 'webcodecs', + source: 'index.src.html', + publicationStatus: 'WD' + }, + { + source: 'codec_registry.src.html', + publicationStatus: 'DRY' + }, + { + source: 'avc_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'vorbis_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'mp3_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'aac_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'flac_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'opus_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'av1_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'vp9_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'vp8_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'pcm_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'alaw_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'ulaw_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'hevc_codec_registration.src.html', + publicationStatus: 'NOTE-WD' + }, + { + source: 'video_frame_metadata_registry.src.html', + publicationStatus: 'DRY', + tokenName: 'ECHIDNA_TOKEN_VIDEOFRAMEMETADATA_REGISTRY' + } +]; + + +/** + * Main loop, create a workflow per spec + */ +import assert from 'node:assert'; +import { readFile, writeFile } from 'node:fs/promises'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const scriptPath = dirname(fileURLToPath(import.meta.url)); +let template = await readFile(join(scriptPath, 'auto-publish-template.yml'), 'utf8'); +template = template.replace(/#{5,}.*#{5,}/s, +`###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +######################################################################`); + +for (const spec of specs) { + if (!spec.shortname) { + spec.shortname = spec.source.split('.')[0].replace(/_/g, '-'); + } + if (!spec.destination) { + spec.destination = spec.source.replace(/\.src/, ''); + } + if (!spec.tokenName) { + spec.tokenName = 'ECHIDNA_TOKEN_' + + spec.shortname.toUpperCase() + .replace(/-/g, '_') + .replace(/_CODEC_/, '_'); // Tokens don't have "_CODEC_" in their name + } + if (spec.additionalPaths) { + spec.additionalPaths = spec.additionalPaths.map(path => `\n - '${path}'`).join(''); + } + + let content = template; + for (const prop of properties) { + content = content.replace(new RegExp('{{' + prop + '}}', 'g'), spec[prop] ?? ''); + } + + const filename = join(scriptPath, 'workflows', `auto-publish-${spec.shortname}.yml`); + await writeFile(filename, content, 'utf8'); +} diff --git a/.github/workflows/auto-publish-aac-codec-registration.yml b/.github/workflows/auto-publish-aac-codec-registration.yml new file mode 100644 index 00000000..c03bacf7 --- /dev/null +++ b/.github/workflows/auto-publish-aac-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish aac-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'aac_codec_registration.src.html' + push: + branches: [main] + paths: + - 'aac_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: aac_codec_registration.src.html + DESTINATION: aac_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_AAC_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-alaw-codec-registration.yml b/.github/workflows/auto-publish-alaw-codec-registration.yml new file mode 100644 index 00000000..42652f2e --- /dev/null +++ b/.github/workflows/auto-publish-alaw-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish alaw-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'alaw_codec_registration.src.html' + push: + branches: [main] + paths: + - 'alaw_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: alaw_codec_registration.src.html + DESTINATION: alaw_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_ALAW_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-av1-codec-registration.yml b/.github/workflows/auto-publish-av1-codec-registration.yml new file mode 100644 index 00000000..4562e5ff --- /dev/null +++ b/.github/workflows/auto-publish-av1-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish av1-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'av1_codec_registration.src.html' + push: + branches: [main] + paths: + - 'av1_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: av1_codec_registration.src.html + DESTINATION: av1_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_AV1_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-avc-codec-registration.yml b/.github/workflows/auto-publish-avc-codec-registration.yml new file mode 100644 index 00000000..3ba5ff83 --- /dev/null +++ b/.github/workflows/auto-publish-avc-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish avc-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'avc_codec_registration.src.html' + push: + branches: [main] + paths: + - 'avc_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: avc_codec_registration.src.html + DESTINATION: avc_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_AVC_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-codec-registry.yml b/.github/workflows/auto-publish-codec-registry.yml new file mode 100644 index 00000000..e6c35874 --- /dev/null +++ b/.github/workflows/auto-publish-codec-registry.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish codec-registry + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'codec_registry.src.html' + push: + branches: [main] + paths: + - 'codec_registry.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: codec_registry.src.html + DESTINATION: codec_registry.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_CODEC_REGISTRY }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: DRY diff --git a/.github/workflows/auto-publish-flac-codec-registration.yml b/.github/workflows/auto-publish-flac-codec-registration.yml new file mode 100644 index 00000000..9a79d790 --- /dev/null +++ b/.github/workflows/auto-publish-flac-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish flac-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'flac_codec_registration.src.html' + push: + branches: [main] + paths: + - 'flac_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: flac_codec_registration.src.html + DESTINATION: flac_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_FLAC_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-hevc-codec-registration.yml b/.github/workflows/auto-publish-hevc-codec-registration.yml new file mode 100644 index 00000000..1253df75 --- /dev/null +++ b/.github/workflows/auto-publish-hevc-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish hevc-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'hevc_codec_registration.src.html' + push: + branches: [main] + paths: + - 'hevc_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: hevc_codec_registration.src.html + DESTINATION: hevc_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_HEVC_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-mp3-codec-registration.yml b/.github/workflows/auto-publish-mp3-codec-registration.yml new file mode 100644 index 00000000..cf990d76 --- /dev/null +++ b/.github/workflows/auto-publish-mp3-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish mp3-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'mp3_codec_registration.src.html' + push: + branches: [main] + paths: + - 'mp3_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: mp3_codec_registration.src.html + DESTINATION: mp3_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_MP3_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-opus-codec-registration.yml b/.github/workflows/auto-publish-opus-codec-registration.yml new file mode 100644 index 00000000..35813946 --- /dev/null +++ b/.github/workflows/auto-publish-opus-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish opus-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'opus_codec_registration.src.html' + push: + branches: [main] + paths: + - 'opus_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: opus_codec_registration.src.html + DESTINATION: opus_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_OPUS_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-pcm-codec-registration.yml b/.github/workflows/auto-publish-pcm-codec-registration.yml new file mode 100644 index 00000000..2046c68b --- /dev/null +++ b/.github/workflows/auto-publish-pcm-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish pcm-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'pcm_codec_registration.src.html' + push: + branches: [main] + paths: + - 'pcm_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: pcm_codec_registration.src.html + DESTINATION: pcm_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_PCM_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-ulaw-codec-registration.yml b/.github/workflows/auto-publish-ulaw-codec-registration.yml new file mode 100644 index 00000000..652eb142 --- /dev/null +++ b/.github/workflows/auto-publish-ulaw-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish ulaw-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'ulaw_codec_registration.src.html' + push: + branches: [main] + paths: + - 'ulaw_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: ulaw_codec_registration.src.html + DESTINATION: ulaw_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_ULAW_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-video-frame-metadata-registry.yml b/.github/workflows/auto-publish-video-frame-metadata-registry.yml new file mode 100644 index 00000000..fc6bb5a0 --- /dev/null +++ b/.github/workflows/auto-publish-video-frame-metadata-registry.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish video-frame-metadata-registry + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'video_frame_metadata_registry.src.html' + push: + branches: [main] + paths: + - 'video_frame_metadata_registry.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: video_frame_metadata_registry.src.html + DESTINATION: video_frame_metadata_registry.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_VIDEOFRAMEMETADATA_REGISTRY }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: DRY diff --git a/.github/workflows/auto-publish-vorbis-codec-registration.yml b/.github/workflows/auto-publish-vorbis-codec-registration.yml new file mode 100644 index 00000000..f6123f03 --- /dev/null +++ b/.github/workflows/auto-publish-vorbis-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish vorbis-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'vorbis_codec_registration.src.html' + push: + branches: [main] + paths: + - 'vorbis_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: vorbis_codec_registration.src.html + DESTINATION: vorbis_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_VORBIS_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-vp8-codec-registration.yml b/.github/workflows/auto-publish-vp8-codec-registration.yml new file mode 100644 index 00000000..49261f4b --- /dev/null +++ b/.github/workflows/auto-publish-vp8-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish vp8-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'vp8_codec_registration.src.html' + push: + branches: [main] + paths: + - 'vp8_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: vp8_codec_registration.src.html + DESTINATION: vp8_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_VP8_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-vp9-codec-registration.yml b/.github/workflows/auto-publish-vp9-codec-registration.yml new file mode 100644 index 00000000..defab53b --- /dev/null +++ b/.github/workflows/auto-publish-vp9-codec-registration.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish vp9-codec-registration + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'vp9_codec_registration.src.html' + push: + branches: [main] + paths: + - 'vp9_codec_registration.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: vp9_codec_registration.src.html + DESTINATION: vp9_codec_registration.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_VP9_REGISTRATION }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: NOTE-WD diff --git a/.github/workflows/auto-publish-webcodecs.yml b/.github/workflows/auto-publish-webcodecs.yml new file mode 100644 index 00000000..f272aec4 --- /dev/null +++ b/.github/workflows/auto-publish-webcodecs.yml @@ -0,0 +1,49 @@ +###################################################################### +# IMPORTANT: Do not edit this file directly! +# +# This workflow was automatically generated through the +# generate-auto-publish-workflows.mjs script. To update the workflow, +# make changes to the template file and run the script again. +###################################################################### + +name: Auto publish webcodecs + +on: + # Worflow runs on pull requests where it makes sure that the spec can still be + # generated, that markup is valid and that there are no broken links, as + # well as on pushes to the default branch where it also deploys the generated + # spec to the gh-pages branch and publishes the result to /TR. + # The "workflow_dispatch" hook allows admins to also trigger the workflow + # manually from GitHub's UI. + pull_request: + paths: + - 'index.src.html' + push: + branches: [main] + paths: + - 'index.src.html' + workflow_dispatch: + +jobs: + main: + runs-on: ubuntu-latest + steps: + # See doc at https://github.com/actions/checkout#checkout-v2 + - name: Checkout repository + uses: actions/checkout@v4 + + # See doc at https://w3c.github.io/spec-prod/ + # The action only deploys the generated spec to the gh-pages branch when + # the workflow was triggered by a push to the default branch. + - name: Build and validate spec, push to gh-pages branch and deploy to /TR if needed + uses: w3c/spec-prod@v2 + with: + TOOLCHAIN: bikeshed + BUILD_FAIL_ON: warning + SOURCE: index.src.html + DESTINATION: index.html + GH_PAGES_BRANCH: gh-pages + W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN_WEBCODECS }} + W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 + W3C_BUILD_OVERRIDE: | + status: WD diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml deleted file mode 100644 index 9ed6feb1..00000000 --- a/.github/workflows/auto-publish.yml +++ /dev/null @@ -1,124 +0,0 @@ -# Workflow based on the w3c/spec-prod action example for multi-spec repos: -# https://github.com/w3c/spec-prod/blob/main/docs/examples.md#multiple-specs-in-same-repository - -name: Build, Validate, Deploy and Publish - -on: - # Worflow runs on pull requests where it makes sure that the spec can still be - # generated, that markup is valid and that there are no broken links, as - # well as on pushes to the default branch where it also deploys the generated - # spec to the gh-pages branch and publishes the result to /TR. - # The "workflow_dispatch" hook allows admins to also trigger the workflow - # manually from GitHub's UI. - pull_request: {} - push: - branches: [main] - workflow_dispatch: - -jobs: - main: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - max-parallel: 1 - matrix: - include: - - source: index.src.html - destination: index.html - echidna_token: ECHIDNA_TOKEN_WEBCODECS - build_override: | - status: WD - - source: codec_registry.src.html - destination: codec_registry.html - echidna_token: ECHIDNA_TOKEN_REGISTRY - build_override: | - status: DRY - - source: avc_codec_registration.src.html - destination: avc_codec_registration.html - echidna_token: ECHIDNA_TOKEN_AVC_REGISTRATION - build_override: | - status: NOTE-WD - - source: vorbis_codec_registration.src.html - destination: vorbis_codec_registration.html - echidna_token: ECHIDNA_TOKEN_VORBIS_REGISTRATION - build_override: | - status: NOTE-WD - - source: mp3_codec_registration.src.html - destination: mp3_codec_registration.html - echidna_token: ECHIDNA_TOKEN_MP3_REGISTRATION - build_override: | - status: NOTE-WD - - source: aac_codec_registration.src.html - destination: aac_codec_registration.html - echidna_token: ECHIDNA_TOKEN_AAC_REGISTRATION - build_override: | - status: NOTE-WD - - source: flac_codec_registration.src.html - destination: flac_codec_registration.html - echidna_token: ECHIDNA_TOKEN_FLAC_REGISTRATION - build_override: | - status: NOTE-WD - - source: opus_codec_registration.src.html - destination: opus_codec_registration.html - echidna_token: ECHIDNA_TOKEN_OPUS_REGISTRATION - build_override: | - status: NOTE-WD - - source: av1_codec_registration.src.html - destination: av1_codec_registration.html - echidna_token: ECHIDNA_TOKEN_AV1_REGISTRATION - build_override: | - status: NOTE-WD - - source: vp9_codec_registration.src.html - destination: vp9_codec_registration.html - echidna_token: ECHIDNA_TOKEN_VP9_REGISTRATION - build_override: | - status: NOTE-WD - - source: vp8_codec_registration.src.html - destination: vp8_codec_registration.html - echidna_token: ECHIDNA_TOKEN_VP8_REGISTRATION - build_override: | - status: NOTE-WD - - source: pcm_codec_registration.src.html - destination: pcm_codec_registration.html - echidna_token: ECHIDNA_TOKEN_PCM_REGISTRATION - build_override: | - status: NOTE-WD - - source: alaw_codec_registration.src.html - destination: alaw_codec_registration.html - echidna_token: ECHIDNA_TOKEN_ALAW_REGISTRATION - build_override: | - status: NOTE-WD - - source: ulaw_codec_registration.src.html - destination: ulaw_codec_registration.html - echidna_token: ECHIDNA_TOKEN_ULAW_REGISTRATION - build_override: | - status: NOTE-WD - - source: hevc_codec_registration.src.html - destination: hevc_codec_registration.html - echidna_token: ECHIDNA_TOKEN_HEVC_REGISTRATION - build_override: | - status: NOTE-WD - - source: video_frame_metadata_registry.src.html - destination: video_frame_metadata_registry.html - echidna_token: ECHIDNA_TOKEN_VIDEOFRAMEMETADATA_REGISTRY - build_override: | - status: DRY - steps: - # See doc at https://github.com/actions/checkout#checkout-v2 - - name: Checkout repository - uses: actions/checkout@v2 - - # See doc at https://github.com/w3c/spec-prod/#spec-prod - # The action only deploys the generated spec to the gh-pages branch when - # the workflow was triggered by a push to the default branch. - - name: Build and validate index.html, push to gh-pages branch if needed - uses: w3c/spec-prod@v2 - with: - TOOLCHAIN: bikeshed - SOURCE: ${{ matrix.source }} - DESTINATION: ${{ matrix.destination }} - BUILD_FAIL_ON: nothing - GH_PAGES_BRANCH: gh-pages - W3C_ECHIDNA_TOKEN: ${{ secrets[matrix.echidna_token] }} - W3C_WG_DECISION_URL: https://github.com/w3c/media-wg/issues/27 - W3C_BUILD_OVERRIDE: ${{ matrix.build_override }}