Overwrite labels note

This commit is contained in:
CrazyMax 2020-10-27 14:13:48 +01:00
parent 4a3b775794
commit 741aa98f85
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -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)