mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-03 05:29:52 +11:00
Install binary to less permissive location to support self-hosted runners
Signed-off-by: Eli Gladman <8713153+egladman@users.noreply.github.com>
This commit is contained in:
parent
d62508b22a
commit
2ab4131ade
1 changed files with 10 additions and 2 deletions
12
action.yml
12
action.yml
|
|
@ -33,7 +33,15 @@ runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
cd /usr/local && { \
|
# Fallback to /usr/local for backwards compatability
|
||||||
|
prefix_dir="${RUNNER_TEMP:-/usr/local}"
|
||||||
|
# Ensure the dir is writable otherwise fallback to tmpdir
|
||||||
|
if [[ ! -d "$prefix_dir" ]] || [[ ! -w "$prefix_dir" ]]; then
|
||||||
|
prefix_dir="$(mktemp -d)"
|
||||||
|
fi
|
||||||
|
printf '%s/bin' "$prefix_dir" >> $GITHUB_PATH
|
||||||
|
# The install.sh script creates path ${prefix_dir}/bin
|
||||||
|
cd "$prefix_dir" && { \
|
||||||
curl -sL https://dl.dagger.io/dagger/install.sh 2>/dev/null | \
|
curl -sL https://dl.dagger.io/dagger/install.sh 2>/dev/null | \
|
||||||
DAGGER_VERSION=${{ inputs.version }} sh 2>/dev/null; }
|
DAGGER_VERSION=${{ inputs.version }} sh 2>/dev/null; }
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -41,7 +49,7 @@ runs:
|
||||||
- run: |
|
- run: |
|
||||||
cd ${{ inputs.workdir }} && { \
|
cd ${{ inputs.workdir }} && { \
|
||||||
DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
|
DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
|
||||||
/usr/local/bin/dagger \
|
dagger \
|
||||||
${{ inputs.dagger-flags }} \
|
${{ inputs.dagger-flags }} \
|
||||||
${{ inputs.verb }} \
|
${{ inputs.verb }} \
|
||||||
${INPUT_MODULE:+-m $INPUT_MODULE} \
|
${INPUT_MODULE:+-m $INPUT_MODULE} \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue