Skip to content

Commit

Permalink
build: use extracted metadata for container images
Browse files Browse the repository at this point in the history
  • Loading branch information
Kneemund committed Feb 12, 2024
1 parent e176065 commit 1486132
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ permissions:
contents: read
packages: write

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-22.04
Expand All @@ -19,12 +22,20 @@ jobs:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
flavor: latest=true
- name: Build & Push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: kneemund/previewbot:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}

0 comments on commit 1486132

Please sign in to comment.