mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Default to build and publish extendible image (#1246)
Switch to publishing the image containing all of the libraries and build dependencies needed to support the plugin being reinstalled as that is the default behaviour when vagrant installs a new plugin. This should allow the default image to be extended with additional plugins and if needed, the authors of the new image may follow and use the slim version as a base to provide a reduced size docker image. Fixes: #1198
This commit is contained in:
28
.github/workflows/docker-image.yml
vendored
28
.github/workflows/docker-image.yml
vendored
@@ -45,6 +45,7 @@ jobs:
|
||||
fi
|
||||
echo ::set-output name=version::${VERSION}
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=slim_tags::$(echo $TAGS | sed "s/,/-slim,/g")-slim
|
||||
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
env:
|
||||
DOCKERHUB_ORGANIZATION: ${{ secrets.DOCKERHUB_ORGANIZATION }}
|
||||
@@ -77,7 +78,7 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
name: Build and push main image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@@ -85,6 +86,28 @@ jobs:
|
||||
platforms: linux/amd64
|
||||
push: ${{ steps.have_credentials.outputs.access }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
target: final
|
||||
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.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
|
||||
-
|
||||
name: Build and push slim image
|
||||
id: docker_build_slim
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: ${{ steps.have_credentials.outputs.access }}
|
||||
tags: ${{ steps.prep.outputs.slim_tags }}
|
||||
target: slim
|
||||
labels: |
|
||||
org.opencontainers.image.title=${{ github.event.repository.name }}
|
||||
org.opencontainers.image.description=${{ github.event.repository.description }}
|
||||
@@ -99,3 +122,6 @@ jobs:
|
||||
-
|
||||
name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
-
|
||||
name: Image digest Slim
|
||||
run: echo ${{ steps.docker_build_slim.outputs.digest }}
|
||||
|
||||
Reference in New Issue
Block a user