mirror of
https://github.com/docker/metadata-action.git
synced 2025-06-23 19:27:58 +02:00
Add json output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@ -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:
|
||||
|
Reference in New Issue
Block a user