Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify adding annotations to the manifest #202

Closed
rjaegers opened this issue Nov 10, 2023 · 2 comments
Closed

Simplify adding annotations to the manifest #202

rjaegers opened this issue Nov 10, 2023 · 2 comments
Labels
ci-improvement Improvement to the ci system good first issue Good for newcomers

Comments

@rjaegers
Copy link
Member

rjaegers commented Nov 10, 2023

Per #201 annotations have been added to the manifest/index file. The way this is done is rather cumbersome at the moment. When docker/build-push-action#958 is solved by means of docker/build-push-action#992, together with docker/metadata-action#351, we can simplify this:

- uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
id: build-and-push
with:
file: .devcontainer/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'merge_group' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,${{ steps.annotations.outputs.annotations }}
sbom: true
provenance: true
cache-from: type=gha
cache-to: type=gha,mode=max

to:

- uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
  id: build-and-push
  with:
    file: .devcontainer/Dockerfile
    platforms: linux/amd64,linux/arm64
    push: ${{ github.event_name != 'merge_group' }}
    tags: ${{ steps.meta.outputs.tags }}
    labels: ${{ steps.meta.outputs.labels }}
    annotations: ${{ steps.meta.outputs.labels }}
    sbom: true
    provenance: true
    cache-from: type=gha
    cache-to: type=gha,mode=max

And remove this:

- run: |
set -Eeuo pipefail
ANNOTATIONS=$(echo '${{ steps.meta.outputs.labels }}' | sed 's/org.opencontainers.image./annotation-index.org.opencontainers.image./' | tr '\n' ',')
echo "annotations=${ANNOTATIONS::-1}" >> "$GITHUB_OUTPUT"
id: annotations

@rjaegers rjaegers added the enhancement New feature or request label Nov 10, 2023
Copy link
Contributor

Thank you for adding your first issue. We will be looking into it as soon as possible.

@rjaegers rjaegers added ci-improvement Improvement to the ci system good first issue Good for newcomers and removed enhancement New feature or request labels Nov 10, 2023
@rjaegers
Copy link
Member Author

rjaegers commented Dec 2, 2023

Closed by #225

@rjaegers rjaegers closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-improvement Improvement to the ci system good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant