-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for running base16-builder-go as a GitHub Action
- Loading branch information
Showing
10 changed files
with
63 additions
and
756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,6 @@ _testmain.go | |
*.prof | ||
|
||
# Builder related things | ||
sources | ||
schemes | ||
templates | ||
base16-builder-go | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "schemes"] | ||
path = schemes | ||
url = https://github.com/base16-project/base16-schemes.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
project_name: base16-builder-go | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Stage 1: Build the application | ||
FROM golang:1.18 as builder | ||
|
||
RUN go install github.com/goreleaser/[email protected] | ||
|
||
RUN mkdir /build | ||
|
||
WORKDIR /src/base16-builder-go | ||
|
||
ADD ./go.mod ./go.sum ./ | ||
RUN go mod download | ||
|
||
ADD . ./ | ||
RUN git clone https://github.com/base16-project/base16-schemes.git schemes | ||
RUN goreleaser build --single-target --snapshot --rm-dist -o /build/base16-builder-go | ||
|
||
RUN ls /build | ||
|
||
# Stage 2: Copy files and configure what we need | ||
FROM debian:buster-slim | ||
|
||
ADD entrypoint.sh /bin | ||
|
||
# Copy the built binary into the container | ||
COPY --from=builder /build /bin | ||
|
||
ENTRYPOINT ["/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: 'Base16 Builder Go' | ||
description: 'Build all the schemes for a template repo' | ||
inputs: | ||
path: | ||
description: 'path to the schemes to use to build' | ||
required: true | ||
default: schemes | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
ARGS="" | ||
|
||
if [[ -n $INPUT_PATH ]]; then | ||
ARGS+="-schemes-dir $INPUT_PATH" | ||
fi | ||
|
||
/bin/base16-builder-go $ARGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
module github.com/belak/base16-builder-go | ||
|
||
go 1.16 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/cbroglie/mustache v1.3.1 | ||
github.com/sirupsen/logrus v1.8.1 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
) | ||
|
||
require ( | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect | ||
github.com/sirupsen/logrus v1.8.1 | ||
github.com/stretchr/testify v1.7.1 // indirect | ||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect | ||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect | ||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect | ||
gopkg.in/yaml.v3 v3.0.0 | ||
) |