Add json output

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-05-22 21:23:06 +02:00
parent 01dc739d69
commit e6f3e4aa91
6 changed files with 359 additions and 20 deletions

View File

@ -165,6 +165,30 @@ jobs:
org.opencontainers.image.description=Another description
org.opencontainers.image.vendor=MyCompany
json:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: ./
with:
images: |
${{ env.DOCKER_IMAGE }}
ghcr.io/name/app
labels: |
maintainer=CrazyMax
-
name: JSON output
run: |
echo "maintainer=${{ fromJSON(steps.meta.outputs.json).labels['maintainer'] }}"
echo "version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"
echo "revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}"
echo "created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}"
docker-push:
runs-on: ubuntu-latest
services: