-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Description
Description
Line 549 in ed95091
| `org.opencontainers.image.licenses=${this.repo.license?.spdx_id || ''}` |
The equivalent expression in Github Actions is invalid as ? syntax is not supported.
The labels/annotations entry would instead look like this:
org.opencontainers.image.licenses=${{ github.event.repository.license && github.event.repository.license.spdx_id }}This is effectively the only label/annotation that can't easily / tersely be expressed, so the {{ license }} handlebars global expression would be convenient.
There isn't much reason to add this other than choosing to be more explicit about the values (I documented such here) as the defaults aren't publicly documented by this action, one must look them up via source:
Lines 540 to 553 in ed95091
| private getOCIAnnotationsWithCustoms(extra: string[]): Array<string> { | |
| const res: Array<string> = [ | |
| `org.opencontainers.image.title=${this.repo.name || ''}`, | |
| `org.opencontainers.image.description=${this.repo.description || ''}`, | |
| `org.opencontainers.image.url=${this.repo.html_url || ''}`, | |
| `org.opencontainers.image.source=${this.repo.html_url || ''}`, | |
| `org.opencontainers.image.version=${this.version.main || ''}`, | |
| `org.opencontainers.image.created=${this.date.toISOString()}`, | |
| `org.opencontainers.image.revision=${this.context.sha || ''}`, | |
| `org.opencontainers.image.licenses=${this.repo.license?.spdx_id || ''}` | |
| ]; | |
| extra.forEach(label => { | |
| res.push(this.setGlobalExp(label)); | |
| }); |
Reactions are currently unavailable