Skip to content

Commit

Permalink
Major Update + Multiple Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HotaruBlaze committed Apr 3, 2023
1 parent d8b3d14 commit 8e716ac
Show file tree
Hide file tree
Showing 11 changed files with 576 additions and 221 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
release:
types: [released]

env:
IMAGE_REGISTRY: ghcr.io
IMAGE_OWNER: hotarublaze
IMAGE_NAME: gotes3mp

jobs:
build-linux:
name: Build Linux
Expand All @@ -13,7 +18,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.18
stable: true
id: linux-build
- name: Build-Linux
Expand All @@ -34,7 +39,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.18
stable: true
id: windows-build
- name: Build-Windows
Expand Down Expand Up @@ -65,3 +70,35 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/tes3mp-scripts.zip

build-dockerImage:
runs-on: ubuntu-latest
# If running with act, Uncomment below
# container: phaze9/action-runner
env:
DOCKER_CONFIG: $HOME/.docker
steps:
- uses: actions/checkout@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.IMAGE_OWNER }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker Image
id: docker_build_x64
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64
labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
build-args: |
BUILD_VERSION=${{ github.event.release.tag_name }}
GITHUB_SHA=$GITHUB_SHA
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# syntax=docker/dockerfile:1
FROM golang:1.20-alpine

RUN mkdir /app
WORKDIR /app

ARG BUILD_VERSION
ARG GITHUB_SHA

COPY ["go.mod", "go.sum", "./"]
COPY ["src/", "./src/"]

RUN go mod download && \
go build -ldflags="-X 'main.Build=$BUILD_VERSION' -X 'main.GitCommit=$GITHUB_SHA'" -o build/goTES3MP-Linux src/*.go
48 changes: 28 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
module github.com/hotarublaze/gotes3mp

go 1.13
go 1.20

require (
github.com/bwmarrin/discordgo v0.23.2
github.com/fatih/color v1.10.0
github.com/fsnotify/fsnotify v1.4.9
github.com/magefile/mage v1.11.0 // indirect
github.com/magiconair/properties v1.8.4 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/sirupsen/logrus v1.8.0
github.com/spf13/afero v1.5.1 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/bwmarrin/discordgo v0.27.1
github.com/fatih/color v1.15.0
github.com/fsnotify/fsnotify v1.6.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/viper v1.15.0
github.com/thoj/go-ircevent v0.0.0-20210723090443-73e444401d64
github.com/tidwall/pretty v1.2.1
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
)

require (
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.1 // indirect
github.com/thoj/go-ircevent v0.0.0-20190807115034-8e7ce4b5a1eb
github.com/tidwall/pretty v1.1.0
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/sys v0.0.0-20210305034016-7844c3c200c3 // indirect
golang.org/x/text v0.3.5 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 8e716ac

Please sign in to comment.