diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e40e412..eaea08c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,9 @@ jobs: image: docker:20.10.3 shell: sh run: | - echo "::set-output name=docker-version::`echo $DOCKER_VERSION`" + echo "DOCKER_VERSION="$DOCKER_VERSION + echo "docker-version=$DOCKER_VERSION" >> $GITHUB_OUTPUT + echo "docker-version="${{ steps.run-docker.outputs.docker-version }} - name: Test the output uses: actions/github-script@v6 with: @@ -39,8 +41,9 @@ jobs: with: image: docker shell: sh - run: | + run: | echo "::set-output name=file-contents::`cat someFile`" + echo "file-contents:"${{ steps.run-docker.outputs.file-contents }} - name: Check if file contents match uses: actions/github-script@v6 with: diff --git a/action.yml b/action.yml index 61c2d09..cb01d82 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ inputs: required: true workspace: description: 'workspace mount' - default: /tmp/clickable/${{ github.event.repository.name }} + default: ${{ github.event.repository.name }} required: false shell: description: 'Use a specific shell' diff --git a/entrypoint.sh b/entrypoint.sh index 45ff44a..09bd6a8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash env | egrep -v "^(#|;| |PATH|SHLVL|HOSTNAME|DOCKER_*)" | awk '$1 ~ /^\w+=/' | xargs -0 > docker-run-action.env set -x -exec docker run --env-file docker-run-action.env --workdir "$INPUT_WORKSPACE" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "$RUNNER_WORKSPACE":"/tmp/clickable" --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "${INPUT_RUN//$'\n'/;}" +env | egrep "(RUNNER_*|GITHUB_*)" | awk '$1 ~ /^\w+=/' | xargs -0 +ls /github +exec docker run --env-file docker-run-action.env --workdir "$RUNNER_WORKSPACE/$INPUT_WORKSPACE" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "$HOME":"$HOME" -v "/github/workflow":"/github/workflow" -v "/github/file_commands":"/github/file_commands" -v "$GITHUB_WORKSPACE":"$GITHUB_WORKSPACE" -v "$GITHUB_PATH":"$GITHUB_PATH" -v "$RUNNER_TEMP":"$RUNNER_TEMP" -v "$GITHUB_STATE":"$GITHUB_STATE" -v "$GITHUB_ENV":"$GITHUB_ENV" -v "$GITHUB_EVENT_PATH":"$GITHUB_EVENT_PATH" -v "$GITHUB_STEP_SUMMARY":"$GITHUB_STEP_SUMMARY" -v "$RUNNER_TOOL_CACHE":"$RUNNER_TOOL_CACHE" -v "$RUNNER_WORKSPACE":"$RUNNER_WORKSPACE" -v "$GITHUB_OUTPUT":"$GITHUB_OUTPUT" --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "${INPUT_RUN//$'\n'/;}"