-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build release * rename steps * build the old way * build docker image * update badge * go get * triage * gopath * set gopath * set go path * convert to go module * refactor * Update .github/workflows/go.yml Co-authored-by: Andriy Knysh <[email protected]> * Update .github/workflows/go.yml Co-authored-by: Andriy Knysh <[email protected]> * Update .github/workflows/go.yml Co-authored-by: Andriy Knysh <[email protected]> * upload artifacts * fix output path Co-authored-by: Andriy Knysh <[email protected]>
- Loading branch information
Showing
7 changed files
with
108 additions
and
13 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,25 @@ | ||
name: "docker" | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
release: | ||
types: | ||
- created | ||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout source code at current commit" | ||
uses: actions/checkout@v2 | ||
- name: "Build and push docker image to DockerHub" | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
repository: ${{ github.repository }} | ||
registry: registry-1.docker.io | ||
tag_with_ref: true | ||
tag_with_sha: true |
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,52 @@ | ||
name: 'go' | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repo | ||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
# Build Go binaries | ||
- name: 'Build Go binaries' | ||
uses: cloudposse/actions/go/[email protected] | ||
env: | ||
GO111MODULE: on | ||
# Architectures to build for | ||
GOX_OSARCH: >- | ||
windows/386 | ||
windows/amd64 | ||
freebsd/arm | ||
netbsd/386 | ||
netbsd/amd64 | ||
netbsd/arm | ||
linux/s390x | ||
linux/arm | ||
darwin/386 | ||
darwin/amd64 | ||
linux/386 | ||
linux/amd64 | ||
freebsd/amd64 | ||
freebsd/386 | ||
openbsd/386 | ||
openbsd/amd64 | ||
OUTPUT_PATH: ${{ github.workspace }}/release/${{ github.event.repository.name }}_ | ||
- name: 'Upload artifacts' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: ${{ github.workspace }}/release/* | ||
# Attach Go binaries to GitHub Release | ||
- name: 'Attach artifacts to GitHub Release' | ||
if: ${{ github.event_name == 'release' }} | ||
uses: cloudposse/actions/github/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
INPUT_PATH: ${{ github.workspace }}/release/${{ github.event.repository.name }}_* |
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,12 +1,12 @@ | ||
FROM golang:1.11.2 as builder | ||
RUN mkdir -p /go/src/github.com/cloudposse/github-status-updater | ||
WORKDIR /go/src/github.com/cloudposse/github-status-updater | ||
COPY . . | ||
RUN go get && CGO_ENABLED=0 go build -v -o "./dist/bin/github-status-updater" *.go | ||
FROM golang:1.13.3-buster as builder | ||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=0 | ||
WORKDIR /usr/src/ | ||
COPY . /usr/src | ||
RUN go build -v -o "bin/github-status-updater" *.go | ||
|
||
|
||
FROM alpine:3.8 | ||
FROM alpine:3.12 | ||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /go/src/github.com/cloudposse/github-status-updater/dist/bin/github-status-updater /usr/bin/github-status-updater | ||
COPY --from=builder /usr/src/bin/* /usr/bin/ | ||
ENV PATH $PATH:/usr/bin | ||
ENTRYPOINT ["github-status-updater"] |
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
This file was deleted.
Oops, something went wrong.
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 @@ | ||
module github.com/cloudposse/github-status-updater | ||
|
||
go 1.13 | ||
|
||
require ( | ||
github.com/google/go-github v17.0.0+incompatible | ||
github.com/google/go-querystring v1.0.0 // indirect | ||
golang.org/x/net v0.0.0-20200625001655-4c5254603344 | ||
) |
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,13 @@ | ||
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= | ||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= | ||
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= | ||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= | ||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | ||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | ||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= | ||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= | ||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |