Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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'/;}"