Skip to content

Instantly share code, notes, and snippets.

@guilhem
Last active August 8, 2022 16:34
Show Gist options
  • Save guilhem/1b975002629ea89b91e6c90eaf370ec0 to your computer and use it in GitHub Desktop.
Save guilhem/1b975002629ea89b91e6c90eaf370ec0 to your computer and use it in GitHub Desktop.
parse json and export output in github actions
jobs:
job:
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: my/image
- id: version
run: |
echo "::set-output name=value::${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment