Small CI for openapi2jsonschema, publish docker image

This commit is contained in:
Yann Hamon 2022-10-16 16:33:48 +02:00
parent 129ffaeef1
commit 3aba162880
2 changed files with 8 additions and 11 deletions

View file

@ -16,6 +16,9 @@ jobs:
working-directory: ./scripts
run: make docker-test docker-acceptance
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
@ -24,15 +27,9 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./scripts
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: "{{defaultContext}}:scripts"
push: true
tags: "openapi2jsonschema:latest"

View file

@ -3,8 +3,8 @@ LABEL org.opencontainers.image.authors="Various contributors" \
org.opencontainers.image.source="https://github.com/yannh/kubeconform/tree/master/scripts" \
org.opencontainers.image.description="Convert OpenAPI CRD to JSON Schema" \
org.opencontainers.image.licenses="Apache License 2.0" \
org.opencontainers.image.title="kubeconform" \
org.opencontainers.image.url="https://github.com/yannh/kubeconform/"
org.opencontainers.image.title="openapi2jsonschema" \
org.opencontainers.image.url="https://github.com/yannh/kubeconform/tree/master/scripts/"
MAINTAINER Yann HAMON <yann@mandragor.org>
ENV FILENAME_FORMAT='{kind}-{group}-{version}'