Skip to content

Commit

Permalink
feat(images): container metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Apr 23, 2024
1 parent e7ef447 commit ddca9f4
Showing 1 changed file with 45 additions and 7 deletions.
52 changes: 45 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,56 @@ jobs:
- name: Set up Docker Buildx
if: steps.semrel.outputs.version != ''
uses: docker/setup-buildx-action@v3
- name: Docker meta for API
id: api-meta
if: steps.semrel.outputs.version != ''
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/api
flavor: |
latest=auto
tags: |
type=semver,pattern={{version}},value=${{ steps.semrel.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semrel.outputs.version }}
type=semver,pattern={{major}},value=${{ steps.semrel.outputs.version }}
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
- name: Docker meta for ember
id: ember-meta
if: steps.semrel.outputs.version != ''
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/ember
flavor: |
latest=auto
tags: |
type=semver,pattern={{version}},value=${{ steps.semrel.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semrel.outputs.version }}
type=semver,pattern={{major}},value=${{ steps.semrel.outputs.version }}
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
- name: Build and Push API Docker Image
if: steps.semrel.outputs.version != ''
uses: docker/build-push-action@v5
id: docker-api
with:
context: ./api/
target: prod
push: true
tags: |
ghcr.io/${{ github.repository }}/api:${{ steps.semrel.outputs.version }}
ghcr.io/${{ github.repository }}/api:latest
tags: ${{ steps.api-meta.outputs.tags }}
labels: |
${{ steps.api-meta.outputs.labels }}
- name: Build and Push Ember Docker Image
if: steps.semrel.outputs.version != ''
Expand All @@ -76,9 +114,9 @@ jobs:
with:
context: ./ember/
push: true
tags: |
ghcr.io/${{ github.repository }}/ember:${{ steps.semrel.outputs.version }}
ghcr.io/${{ github.repository }}/ember:latest
tags: ${{ steps.ember-meta.outputs.tags }}
labels: |
${{ steps.ember-meta.outputs.labels }}
- name: Sign api image and attach SBOM attestation
if: steps.semrel.outputs.version != ''
Expand Down

0 comments on commit ddca9f4

Please sign in to comment.