-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from mpuckett159/features/github-actions
Features/GitHub actions
- Loading branch information
Showing
12 changed files
with
214 additions
and
109 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,20 @@ | ||
name: lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: latest | ||
working-directory: frontend | ||
args: --out-format=tab |
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,29 @@ | ||
name: Build on Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Set up QEMU | ||
- uses: docker/setup-qemu-action@v1 | ||
name: Set up Docker Buildx | ||
- uses: docker/setup-buildx-action@v1 | ||
name: Login to DockerHub | ||
- uses: docker/#-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
- name: Build and push API | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./frontend | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
mpuckett259/stack-web-app:latest |
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 @@ | ||
# Compile and export binary for Go app | ||
FROM golang:1.16.3-buster AS build | ||
|
||
ENV GO111MODULE=auto | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
RUN go build -o /app/main -ldflags="-extldflags=-static" -tags sqlite_omit_load_extension | ||
|
||
# Copy out app from build image and set execution | ||
FROM alpine:latest | ||
COPY --from=build /app/main / | ||
CMD [ "/main" ] |
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 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 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 @@ | ||
module stack-web-app | ||
module stack-web-app/frontend | ||
|
||
go 1.15 | ||
go 1.16 | ||
|
||
require ( | ||
github.com/google/uuid v1.2.0 | ||
github.com/gorilla/handlers v1.5.1 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/gorilla/websocket v1.4.2 | ||
github.com/mattn/go-sqlite3 v1.14.6 | ||
github.com/mattn/go-sqlite3 v1.14.7 | ||
github.com/sirupsen/logrus v1.8.1 | ||
) |
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 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
Oops, something went wrong.