revert changes with to output steps as json as well as redundant output with sha2
This commit is contained in:
@@ -4,43 +4,40 @@ on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
dockerfile:
|
||||
description: 'Path to Dockerfile'
|
||||
description: "Path to Dockerfile"
|
||||
required: true
|
||||
type: string
|
||||
context:
|
||||
description: 'Build context'
|
||||
default: '.'
|
||||
description: "Build context"
|
||||
default: "."
|
||||
required: false
|
||||
image:
|
||||
description: 'Where to store the built image'
|
||||
description: "Where to store the built image"
|
||||
required: true
|
||||
type: string
|
||||
submodules:
|
||||
description: 'Submodules pull strategy'
|
||||
default: 'recursive'
|
||||
description: "Submodules pull strategy"
|
||||
default: "recursive"
|
||||
required: false
|
||||
type: string
|
||||
user:
|
||||
description: 'Git user for checkout'
|
||||
default: 'automation'
|
||||
description: "Git user for checkout"
|
||||
default: "automation"
|
||||
required: false
|
||||
type: string
|
||||
token:
|
||||
description: 'Git token for checkout'
|
||||
description: "Git token for checkout"
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
tag:
|
||||
description: 'Built image tag'
|
||||
tag:
|
||||
description: "Built image tag"
|
||||
value: ${{ jobs.build.outputs.tag }}
|
||||
image:
|
||||
description: 'Built image name'
|
||||
description: "Built image name"
|
||||
value: ${{ jobs.build.outputs.image }}
|
||||
sha:
|
||||
description: 'Git SHA used for the build'
|
||||
value: ${{ jobs.build.outputs.sha }}
|
||||
sha2:
|
||||
description: 'Git SHA used for the build'
|
||||
description: "Git SHA used for the build"
|
||||
value: ${{ jobs.build.outputs.sha }}
|
||||
jobs:
|
||||
build:
|
||||
@@ -81,13 +78,7 @@ jobs:
|
||||
id: facts
|
||||
run: |
|
||||
echo "sha=${{ gitea.event.release.target_commitish }}" >> $GITHUB_OUTPUT
|
||||
- name: Visa build outputs och validera
|
||||
run: |
|
||||
echo "outputs från steps:"
|
||||
echo '${{ toJSON(steps) }}'
|
||||
echo " "
|
||||
outputs:
|
||||
tag: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
|
||||
image: ${{ inputs.image }}
|
||||
sha: ${{ gitea.sha }}
|
||||
sha2: ${{ steps.facts.outputs.sha }}
|
||||
|
||||
Reference in New Issue
Block a user