Skip to content

Commit

Permalink
Add docker repository for altair
Browse files Browse the repository at this point in the history
  • Loading branch information
insomnius committed Dec 27, 2020
1 parent 571a7e3 commit 02fd708
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Github Registry
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Login to github registry
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Build binary
run: make build

- name: Build docker image
run: make build_docker

- name: Push docker image
run: make push_docker
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:3.6

COPY ./build/linux/altair /usr/local/bin/
COPY ./migration/ /opt/altair/

RUN apk --update upgrade
RUN apk --no-cache add curl tzdata

EXPOSE 2019
ENTRYPOINT ["altair", "run"]
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export VERSION ?= $(shell git show -q --format=%h)
export IMAGE ?= codefluence/altair

test:
go test -race -cover -coverprofile=cover.out $$(go list ./... | grep -Ev "altair$$|core|mock|interfaces|testhelper")

Expand All @@ -19,3 +22,11 @@ build:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ./build/linux/altair
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o ./build/windows/altair
GOOS=darwin GOARCH=386 CGO_ENABLED=0 go build -o ./build/darwin/altair

build_docker:
sudo docker build -t $(IMAGE):$(VERSION) -f ./Dockerfile .
sudo docker build -t $(IMAGE):latest -f ./Dockerfile .

push_docker:
sudo docker push $(IMAGE):$(VERSION)
sudo docker push $(IMAGE):latest
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ This software is still in *alpha version*, which may contain several hidden bugs

[Plugin API Documentation in Postman](https://documenter.getpostman.com/view/3666028/SzmcZJ79?version=latest#b870ae5a-b305-4016-8155-4899af1f26b1)

## Docker

[[Here](https://hub.docker.com/r/codefluence/altair)]

> TBD
## How to Use

> TBD
Expand Down

0 comments on commit 02fd708

Please sign in to comment.