Skip to content

Commit

Permalink
added github docker registry
Browse files Browse the repository at this point in the history
  • Loading branch information
brainexe committed Nov 24, 2020
1 parent e5c3d2e commit a0cfbef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Release

on:
release:
types: [created]
Expand All @@ -19,3 +21,17 @@ jobs:
goarch: ${{ matrix.goarch }}
binary_name: slack-bot
project_path: "./cmd/bot"
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: innogames/slack-bot/slack-bot
tag_with_ref: true
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Test

on:
push:
branches:
- master
pull_request:

name: Test
jobs:
test:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.15-alpine as builder
WORKDIR /code/
COPY . ./

RUN apk add git
RUN apk add git build-base
RUN go build -trimpath -ldflags="-s -w" -o /app cmd/bot/main.go

FROM alpine:latest as alpine
Expand Down

0 comments on commit a0cfbef

Please sign in to comment.