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

Moves metada logic into publish step #76

Merged
merged 3 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,11 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: keystone-api
tags: |
type=semver,pattern={{version}}
type=raw,value=latest

- name: Build image
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: keystone-api:latest
outputs: type=docker,dest=/tmp/keystone-api.tar

- name: Upload image artifact
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Publish Docker
on:
workflow_call:

env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/keystone-api

jobs:
publish-docker:
runs-on: ubuntu-latest
Expand All @@ -24,6 +21,15 @@ jobs:
- name: Load image
run: docker load --input /tmp/keystone-api.tar

- name: Define Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/keystone-api
tags: |
type=semver,pattern={{version}}
type=raw,value=latest

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -36,3 +42,5 @@ jobs:
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading