mirror of
https://github.com/docker/metadata-action.git
synced 2024-12-22 21:15:39 +00:00
Overwrite labels note
This commit is contained in:
parent
4a3b775794
commit
741aa98f85
23
README.md
23
README.md
|
@ -25,6 +25,7 @@ ___
|
||||||
* [Notes](#notes)
|
* [Notes](#notes)
|
||||||
* [`tag-match` examples](#tag-match-examples)
|
* [`tag-match` examples](#tag-match-examples)
|
||||||
* [Schedule tag](#schedule-tag)
|
* [Schedule tag](#schedule-tag)
|
||||||
|
* [Overwrite labels](#overwrite-labels)
|
||||||
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
||||||
* [How can I help?](#how-can-i-help)
|
* [How can I help?](#how-can-i-help)
|
||||||
* [License](#license)
|
* [License](#license)
|
||||||
|
@ -157,6 +158,28 @@ the following expressions:
|
||||||
|
|
||||||
You can find more examples in the [CI workflow](.github/workflows/ci.yml).
|
You can find more examples in the [CI workflow](.github/workflows/ci.yml).
|
||||||
|
|
||||||
|
### Overwrite labels
|
||||||
|
|
||||||
|
If some of the [OCI Image Format Specification](https://github.com/opencontainers/image-spec/blob/master/annotations.md)
|
||||||
|
labels generated are not suitable, you can overwrite them like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/386
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||||
|
labels: |
|
||||||
|
${{ steps.docker_meta.outputs.labels }}
|
||||||
|
org.opencontainers.image.title=MyCustomTitle
|
||||||
|
org.opencontainers.image.description=Another description
|
||||||
|
org.opencontainers.image.vendor=MyCompany
|
||||||
|
```
|
||||||
|
|
||||||
## Keep up-to-date with GitHub Dependabot
|
## Keep up-to-date with GitHub Dependabot
|
||||||
|
|
||||||
Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot)
|
Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot)
|
||||||
|
|
Loading…
Reference in a new issue