1
0
mirror of synced 2026-01-07 00:01:39 -05:00

note about registry_package firing multiple times (#22092)

Co-authored-by: hubwriter <hubwriter@github.com>
This commit is contained in:
Max Jonas Werner
2023-05-24 16:28:10 +02:00
committed by GitHub
parent f645d2d9e8
commit e026be6678

View File

@@ -1041,7 +1041,21 @@ on:
{% data reusables.actions.branch-requirement %}
Runs your workflow when activity related to {% data variables.product.prodname_registry %} occurs in your repository. For more information, see "[AUTOTITLE](/packages)."
{% note %}
**Note**: When pushing multi-architecture container images, this event occurs once per manifest, so you might observe your workflow triggering multiple times. To mitigate this, and only run your workflow job for the event that contains the actual image tag information, use a conditional:
{% raw %}
```yaml
jobs:
job_name:
if: ${{ github.event.registry_package.package_version.container_metadata.tag.name != '' }}
```
{% endraw %}
{% endnote %}
Runs your workflow when activity related to {% data variables.product.prodname_registry %} occurs in your repository. For more information, see "[{% data variables.product.prodname_registry %} Documentation](/packages)."
For example, you can run a workflow when a new package version has been `published`.