-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVariantfile
More file actions
53 lines (52 loc) · 1.47 KB
/
Variantfile
File metadata and controls
53 lines (52 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
parameters:
- name: event
type: object
default: "/github/workflow/event.json"
script: |
cat <<EOF
{{ get "event" | toYaml }}
EOF
tasks:
foo:
script: |
echo foo!
fail:
script: |
echo simulated failure
exit 2
dockerrun:
script: |
uname -a
echo GITHUB_WORKFLOW: $GITHUB_WORKFLOW
echo GITHUB_ACTION: $GITHUB_ACTION
echo GITHUB_EVENT_NAME: $GITHUB_EVENT_NAME
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
REPO=$GITHUB_REPOSITORY
REPO=${REPO/*\/}
docker run \
--workdir /github/workspace \
--rm \
-e GITHUB_TOKEN \
-e HOME \
-e GITHUB_REF \
-e GITHUB_SHA \
-e GITHUB_REPOSITORY \
-e GITHUB_ACTOR \
-e GITHUB_WORKFLOW \
-e GITHUB_HEAD_REF \
-e GITHUB_BASE_REF \
-e GITHUB_EVENT_NAME \
-e GITHUB_WORKSPACE \
-e GITHUB_ACTION \
-e GITHUB_EVENT_PATH \
-e RUNNER_OS \
-e RUNNER_TOOL_CACHE \
-e RUNNER_TEMP \
-e RUNNER_WORKSPACE \
-e ACTIONS_RUNTIME_URL \
-e ACTIONS_RUNTIME_TOKEN \
-e GITHUB_ACTIONS=true \
-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/${REPO}/${REPO}":"/github/workspace" alpine:3.9 sh -c 'echo hello docker!; cat somefile; ls -lah /github/home'