Skip to content

Commit

Permalink
Switch to GH actions and upgrade Go libs
Browse files Browse the repository at this point in the history
  • Loading branch information
wafflespeanut committed Apr 2, 2024
1 parent 9947434 commit 2fb413e
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 21 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: build-and-push
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: wafflespeanut/ace-away:latest
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ yarn-error.log*
*.sw?

# Go stuff
go.sum
ace_away
pkg/
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
FROM golang:1.21-alpine as go
ENV GOOS=linux
ENV CGO_ENABLED=0
ADD server /usr/src/app
WORKDIR /usr/src/app
RUN go build -a -installsuffix cgo

FROM node:12.11-buster as node
ADD . /home/node/app
WORKDIR /home/node/app
RUN npm install && npm run lint && npm run build

FROM alpine:3.9

COPY server/ace_away /
COPY dist /dist
COPY --from=go /usr/src/app/ace_away /
COPY --from=node /home/node/app/dist /dist

CMD ["/ace_away", "-path", "/dist"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Usage

> **NOTE:** This requires `npm` and `go ^1.11`.
> **NOTE:** This requires `npm == 12.11` (haven't migrated Vue yet) and `go ^1.21`.
```
make prepare
Expand Down
11 changes: 8 additions & 3 deletions server/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module ace_away

go 1.12
go 1.21

require (
github.com/davecgh/go-spew v1.1.1
github.com/stretchr/testify v1.4.0
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
github.com/stretchr/testify v1.9.0
golang.org/x/net v0.22.0
)

require (
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
11 changes: 11 additions & 0 deletions server/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 2fb413e

Please sign in to comment.