Skip to content
This repository was archived by the owner on Nov 2, 2021. It is now read-only.

Commit cdeafbe

Browse files
authored
Merge pull request #26 from cedrickring/go1.14
Add support for Go 1.14
2 parents c0f74f4 + aff24c3 commit cdeafbe

11 files changed

Lines changed: 129 additions & 64 deletions

File tree

.github/workflows/push.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,11 @@ jobs:
3131
env:
3232
IMPORT: cedrickring/golang-action
3333
PROJECT_PATH: ./tests/projects/go_standard
34+
- name: Install dockerfile_lint
35+
run: sudo npm i -g dockerfile_lint
3436
- name: Lint
35-
uses: actions/action-builder/shell@master
36-
with:
37-
entrypoint: make
38-
args: lint
37+
run: make lint
3938
- name: Test
40-
uses: actions/action-builder/shell@master
41-
with:
42-
entrypoint: make
43-
args: test
39+
run: make test
4440
- name: Build
45-
uses: actions/action-builder/docker@master
46-
with:
47-
entrypoint: make
48-
args: build
41+
run: make build

.github/workflows/release.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,20 @@ jobs:
3131
env:
3232
IMPORT: cedrickring/golang-action
3333
PROJECT_PATH: ./tests/projects/go_standard
34+
- name: Install dockerfile_lint
35+
run: sudo npm i -g dockerfile_lint
3436
- name: Lint
35-
uses: actions/action-builder/shell@master
36-
with:
37-
entrypoint: make
38-
args: lint
39-
- name: Docker Tag
40-
uses: actions/action-builder/docker@master
41-
with:
42-
entrypoint: make
43-
args: docker-tag
44-
- name: Docker Login
45-
uses: actions/docker/login@master
46-
env:
47-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
48-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
37+
run: make lint
4938
- name: Test
50-
uses: actions/action-builder/shell@master
39+
run: make test
40+
- name: Docker Login
41+
uses: azure/docker-login@v1
5142
with:
52-
entrypoint: make
53-
args: test
43+
password: ${{ secrets.DOCKER_PASSWORD }}
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
- name: Docker Tag
46+
run: make docker-tag
5447
- name: Build
55-
uses: actions/action-builder/docker@master
56-
with:
57-
entrypoint: make
58-
args: build
48+
run: make test
5949
- name: Docker Publish
60-
uses: actions/action-builder/docker@master
61-
with:
62-
entrypoint: make
63-
args: publish
50+
run: make publish

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
FROM golang:1.13
1+
FROM golang:1.14
22

33
LABEL name="Golang Action"
44
LABEL maintainer="Cedric Kring"
5-
LABEL version="1.4.1"
5+
LABEL version="1.5.0"
66
LABEL repository="https://github.com/cedrickring/golang-action"
77

88
LABEL com.github.actions.name="Golang Action"
99
LABEL com.github.actions.description="Run Golang commands"
1010
LABEL com.github.actions.icon="box"
1111
LABEL com.github.actions.color="blue"
1212

13-
# Install dep and check sha256 checksum matches for version 0.5.0 https://github.com/golang/dep/releases/tag/v0.5.0
13+
# Install dep and check sha256 checksum matches for version 0.5.4 https://github.com/golang/dep/releases/tag/v0.5.4
1414
RUN set -eux; \
15-
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16-
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 $GOPATH/bin/dep" | sha256sum -c -; \
15+
curl -L -s https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16+
echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
1717
chmod +x "${GOPATH}/bin/dep";
1818

1919
COPY entrypoint.sh /entrypoint.sh

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@master
1919

2020
- name: run
21-
uses: cedrickring/golang-action@1.4.1
21+
uses: cedrickring/golang-action@1.5.0
2222
```
2323
2424
@@ -27,7 +27,7 @@ To run a custom command, just use:
2727
```yaml
2828
steps:
2929
- name: Run custom command
30-
uses: cedrickring/golang-action@1.4.1
30+
uses: cedrickring/golang-action@1.5.0
3131
with:
3232
args: make my-target
3333
```
@@ -39,7 +39,7 @@ source Go project:
3939
```yaml
4040
steps:
4141
- name: Run with custom import path
42-
uses: cedrickring/golang-action@1.4.1
42+
uses: cedrickring/golang-action@1.5.0
4343
env:
4444
IMPORT: "root/repo"
4545
```
@@ -49,7 +49,7 @@ To use Go Modules add `GO111MODULE=on` to the step:
4949
```yaml
5050
steps:
5151
- name: Go Modules
52-
uses: cedrickring/golang-action@1.4.1
52+
uses: cedrickring/golang-action@1.5.0
5353
env:
5454
GO111MODULE: "on"
5555
```
@@ -59,7 +59,7 @@ If your go project is not located at the root of the repo you can also specify e
5959
```yaml
6060
steps:
6161
- name: Custom project path
62-
uses: cedrickring/golang-action@1.4.1
62+
uses: cedrickring/golang-action@1.5.0
6363
env:
6464
PROJECT_PATH: "./path/in/my/project"
6565
```
@@ -68,5 +68,5 @@ To use a specific golang version (1.10, 1.11, 1.12, 1.13), defaults to the lates
6868
```yaml
6969
steps:
7070
- name: Use Go 1.11
71-
uses: cedrickring/golang-action/go1.11@1.4.1
71+
uses: cedrickring/golang-action/go1.11@1.5.0
7272
```

docker.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ ACTION_MINOR_VERSION=$(shell build/semver get minor $(ACTION_VERSION))
1010

1111
.PHONY: docker-lint
1212
docker-lint: update-docker-go-versions ## Run Dockerfile Lint on all dockerfiles.
13+
ifeq (, $(shell which dockerfile_lint))
14+
$(error "dockerfile_lint not installed")
15+
endif
1316
dockerfile_lint -r $(ROOT_DIR)/.dockerfile_lint/github_actions.yaml $(wildcard Dockerfile* */Dockerfile*)
1417

1518
.PHONY: docker-build

go1.10/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ FROM golang:1.10
22

33
LABEL name="Golang Action"
44
LABEL maintainer="Cedric Kring"
5-
LABEL version="1.4.1"
5+
LABEL version="1.5.0"
66
LABEL repository="https://github.com/cedrickring/golang-action"
77

88
LABEL com.github.actions.name="Golang Action"
99
LABEL com.github.actions.description="Run Golang commands"
1010
LABEL com.github.actions.icon="box"
1111
LABEL com.github.actions.color="blue"
1212

13-
# Install dep and check sha256 checksum matches for version 0.5.0 https://github.com/golang/dep/releases/tag/v0.5.0
13+
# Install dep and check sha256 checksum matches for version 0.5.4 https://github.com/golang/dep/releases/tag/v0.5.4
1414
RUN set -eux; \
15-
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16-
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 $GOPATH/bin/dep" | sha256sum -c -; \
15+
curl -L -s https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16+
echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
1717
chmod +x "${GOPATH}/bin/dep";
1818

1919
COPY entrypoint.sh /entrypoint.sh

go1.11/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ FROM golang:1.11
22

33
LABEL name="Golang Action"
44
LABEL maintainer="Cedric Kring"
5-
LABEL version="1.4.1"
5+
LABEL version="1.5.0"
66
LABEL repository="https://github.com/cedrickring/golang-action"
77

88
LABEL com.github.actions.name="Golang Action"
99
LABEL com.github.actions.description="Run Golang commands"
1010
LABEL com.github.actions.icon="box"
1111
LABEL com.github.actions.color="blue"
1212

13-
# Install dep and check sha256 checksum matches for version 0.5.0 https://github.com/golang/dep/releases/tag/v0.5.0
13+
# Install dep and check sha256 checksum matches for version 0.5.4 https://github.com/golang/dep/releases/tag/v0.5.4
1414
RUN set -eux; \
15-
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16-
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 $GOPATH/bin/dep" | sha256sum -c -; \
15+
curl -L -s https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16+
echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
1717
chmod +x "${GOPATH}/bin/dep";
1818

1919
COPY entrypoint.sh /entrypoint.sh

go1.12/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ FROM golang:1.12
22

33
LABEL name="Golang Action"
44
LABEL maintainer="Cedric Kring"
5-
LABEL version="1.4.1"
5+
LABEL version="1.5.0"
66
LABEL repository="https://github.com/cedrickring/golang-action"
77

88
LABEL com.github.actions.name="Golang Action"
99
LABEL com.github.actions.description="Run Golang commands"
1010
LABEL com.github.actions.icon="box"
1111
LABEL com.github.actions.color="blue"
1212

13-
# Install dep and check sha256 checksum matches for version 0.5.0 https://github.com/golang/dep/releases/tag/v0.5.0
13+
# Install dep and check sha256 checksum matches for version 0.5.4 https://github.com/golang/dep/releases/tag/v0.5.4
1414
RUN set -eux; \
15-
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16-
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 $GOPATH/bin/dep" | sha256sum -c -; \
15+
curl -L -s https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16+
echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
1717
chmod +x "${GOPATH}/bin/dep";
1818

1919
COPY entrypoint.sh /entrypoint.sh

go1.13/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ FROM golang:1.13
22

33
LABEL name="Golang Action"
44
LABEL maintainer="Cedric Kring"
5-
LABEL version="1.4.1"
5+
LABEL version="1.5.0"
66
LABEL repository="https://github.com/cedrickring/golang-action"
77

88
LABEL com.github.actions.name="Golang Action"
99
LABEL com.github.actions.description="Run Golang commands"
1010
LABEL com.github.actions.icon="box"
1111
LABEL com.github.actions.color="blue"
1212

13-
# Install dep and check sha256 checksum matches for version 0.5.0 https://github.com/golang/dep/releases/tag/v0.5.0
13+
# Install dep and check sha256 checksum matches for version 0.5.4 https://github.com/golang/dep/releases/tag/v0.5.4
1414
RUN set -eux; \
15-
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16-
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 $GOPATH/bin/dep" | sha256sum -c -; \
15+
curl -L -s https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16+
echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
1717
chmod +x "${GOPATH}/bin/dep";
1818

1919
COPY entrypoint.sh /entrypoint.sh

go1.14/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM golang:1.14
2+
3+
LABEL name="Golang Action"
4+
LABEL maintainer="Cedric Kring"
5+
LABEL version="1.5.0"
6+
LABEL repository="https://github.com/cedrickring/golang-action"
7+
8+
LABEL com.github.actions.name="Golang Action"
9+
LABEL com.github.actions.description="Run Golang commands"
10+
LABEL com.github.actions.icon="box"
11+
LABEL com.github.actions.color="blue"
12+
13+
# Install dep and check sha256 checksum matches for version 0.5.4 https://github.com/golang/dep/releases/tag/v0.5.4
14+
RUN set -eux; \
15+
curl -L -s https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 -o "$GOPATH/bin/dep"; \
16+
echo "40a78c13753f482208d3f4bea51244ca60a914341050c588dad1f00b1acc116c $GOPATH/bin/dep" | sha256sum -c -; \
17+
chmod +x "${GOPATH}/bin/dep";
18+
19+
COPY entrypoint.sh /entrypoint.sh
20+
21+
ENTRYPOINT ["/entrypoint.sh"]
22+
CMD [""]

0 commit comments

Comments
 (0)