Skip to content

Commit

Permalink
Add labels to pushed image versions (#3505)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruffsl authored Mar 23, 2023
1 parent 0cd3917 commit 4a8b137
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/update_ci_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- name: Set build config
id: config
run: |
created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "created=${created}" >> $GITHUB_OUTPUT
version=$(grep -oP '(?<=<version>).*?(?=</version>)' navigation2/package.xml)
echo "version=${version}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -109,6 +112,19 @@ jobs:
tags: |
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.config.outputs.version }}
labels: |
org.opencontainers.image.authors=${{ github.event.repository.owner.html_url }}
org.opencontainers.image.created=${{ steps.config.outputs.created }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.documentation=${{ github.event.repository.homepage }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
org.opencontainers.image.ref.name=${{ github.ref }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.vendor=${{ github.event.repository.owner.login }}
org.opencontainers.image.version=${{ steps.config.outputs.version }}
- name: Image digest
if: steps.config.outputs.trigger == 'true'
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 4a8b137

Please sign in to comment.