This repository was archived by the owner on Nov 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ inputs:
13
13
runs :
14
14
using : ' docker'
15
15
image : ' Dockerfile'
16
- env :
17
- PROJECT_PATH : ' ${{ inputs.projectPath }}'
18
16
args :
19
17
- ${{ inputs.customCommand }}
20
18
branding :
Original file line number Diff line number Diff line change 3
3
set -e
4
4
5
5
# PROJECT_PATH specifies the subdirectory in the working directory that the Go project is
6
- if [ -z " ${PROJECT_PATH } " ]; then
7
- PROJECT_PATH =" ."
6
+ if [ -z " ${INPUT_PROJECTPATH } " ]; then
7
+ INPUT_PROJECTPATH =" ."
8
8
fi
9
9
10
- cd " ${WORKDIR } /${PROJECT_PATH } "
10
+ cd " ${GITHUB_WORKSPACE } /${INPUT_PROJECTPATH } "
11
11
12
12
# If a command was specified with `args: "..."`, then run it. Otherwise,
13
13
# look for something useful to run.
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ LABEL com.github.actions.description="Run Golang commands"
10
10
LABEL com.github.actions.icon="box"
11
11
LABEL com.github.actions.color="blue"
12
12
13
+ # Install dep and check sha256 checksum matches for version 0.5.2 https://github.com/golang/dep/releases/tag/v0.5.2
14
+ RUN set -eux; \
15
+ curl -L -s https://github.com/golang/dep/releases/download/v0.5.2/dep-linux-amd64 -o "$GOPATH/bin/dep" ; \
16
+ echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
17
+ chmod +x "${GOPATH}/bin/dep" ;
18
+
13
19
COPY entrypoint.sh /entrypoint.sh
14
20
15
21
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 8
8
WORKDIR=" ${GOPATH} /src/github.com/${IMPORT} "
9
9
10
10
# PROJECT_PATH specifies the subdirectory in the working directory that the Go project is
11
- if [ -z " ${PROJECT_PATH } " ]; then
12
- PROJECT_PATH =" ."
11
+ if [ -z " ${INPUT_PROJECTPATH } " ]; then
12
+ INPUT_PROJECTPATH =" ."
13
13
fi
14
14
15
15
# Go can only find dependencies if they're under $GOPATH/src.
16
16
# GitHub Actions mounts your repository outside of $GOPATH.
17
17
# So symlink the repository into $GOPATH, and then cd to it.
18
18
mkdir -p " $( dirname " ${WORKDIR} " ) "
19
19
ln -s " ${PWD} " " ${WORKDIR} "
20
- cd " ${WORKDIR} /${PROJECT_PATH } "
20
+ cd " ${WORKDIR} /${INPUT_PROJECTPATH } "
21
21
22
- # If a command was specified with `args= "..."`, then run it. Otherwise,
22
+ # If a command was specified with `args: "..."`, then run it. Otherwise,
23
23
# look for something useful to run.
24
24
if [ $# -eq 0 ] || [ " $* " = " " ]; then
25
25
if [ -r Makefile ]; then
Original file line number Diff line number Diff line change 3
3
set -e
4
4
5
5
# PROJECT_PATH specifies the subdirectory in the working directory that the Go project is
6
- if [ -z " ${PROJECT_PATH } " ]; then
7
- PROJECT_PATH =" ."
6
+ if [ -z " ${INPUT_PROJECTPATH } " ]; then
7
+ INPUT_PROJECTPATH =" ."
8
8
fi
9
9
10
- cd " ${WORKDIR } /${PROJECT_PATH } "
10
+ cd " ${GITHUB_WORKSPACE } /${INPUT_PROJECTPATH } "
11
11
12
12
# If a command was specified with `args: "..."`, then run it. Otherwise,
13
13
# look for something useful to run.
You can’t perform that action at this time.
0 commit comments