Skip to content

Commit 45616ac

Browse files
committed
refactor: Update the output of the action to include all the outputs of the docker run step in JSON format
The previous output file has been removed.
1 parent d3be410 commit 45616ac

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [1.1.0] - 2023-03-05
10+
### Changed
11+
- Updated the output of the action to include all the outputs of the docker run step in JSON format, using the `toJSON` function. Removed the previous output file.
12+
913
## [1.0.0] - 2023-03-04
1014
### Added
1115
- v1 of the Docker container action

action.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ inputs:
3030
required: false
3131
default: 'https://ghcr.io'
3232
outputs:
33-
output:
34-
description: 'The output file of the docker run step'
35-
value: ${{ steps.run.outputs.file }}
33+
outputs:
34+
description: 'The outputs of the docker run step in JSON format'
35+
value: ${{ toJSON(steps.run.outputs) }}
3636
runs:
3737
using: 'composite'
3838
steps:
@@ -62,8 +62,6 @@ runs:
6262
INPUT_WORKING_DIRECTORY: ${{ inputs.working-directory }}
6363
INPUT_GITHUB_SERVER_URL: ${{ inputs.github-server-url }}
6464
INPUT_DOCKER_REGISTRY_URL: ${{ inputs.docker-registry-url }}
65-
run: |
66-
echo "file=$GITHUB_OUTPUT" >> $GITHUB_OUTPUT
67-
docker run --workdir "/github/workspace" --rm --env-file <(env | grep -E '^(ACTIONS|GITHUB|INPUT|RUNNER)_') -e HOME -e CI -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "$GITHUB_WORKSPACE":"/github/workspace" ${{ inputs.opts }} "${INPUT_DOCKER_REGISTRY_URL#http*://}/$INPUT_REPOSITORY:$INPUT_TAG" ${{ inputs.args }}
65+
run: docker run --workdir "/github/workspace" --rm --env-file <(env | grep -E '^(ACTIONS|GITHUB|INPUT|RUNNER)_') -e HOME -e CI -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "$GITHUB_WORKSPACE":"/github/workspace" ${{ inputs.opts }} "${INPUT_DOCKER_REGISTRY_URL#http*://}/$INPUT_REPOSITORY:$INPUT_TAG" ${{ inputs.args }}
6866
working-directory: ${{ inputs.working-directory }}
6967
shell: bash

0 commit comments

Comments
 (0)