Skip to content

Commit

Permalink
feat(go): update Dockerfile and github action
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Feb 18, 2024
1 parent 73d0ae5 commit 18962a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
11 changes: 9 additions & 2 deletions template/go/.github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
- '[v]?[0-9]+\.[0-9]+\.[0-9]+.*'

jobs:
todo:
name: TODO
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
9 changes: 5 additions & 4 deletions template/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ FROM golang:{{go_version}}-alpine AS builder
LABEL author="{{authors}}"

# Set necessary environmet variables needed for our image
ENV GO111MODULE=on
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
# Such as:
# ENV GO111MODULE=on
# ENV CGO_ENABLED=0
# ENV GOOS=linux
# ENV GOARCH=amd64

0 comments on commit 18962a0

Please sign in to comment.