Skip to content

Commit 63eaeb0

Browse files
authored
publish a docker image to quay for every release (#86)
* publish a docker image to quay for every release Signed-off-by: Josh Gwosdz <[email protected]> * quote secret injection Signed-off-by: Josh Gwosdz <[email protected]> * clean up build workflow Signed-off-by: Josh Gwosdz <[email protected]>
1 parent 8397110 commit 63eaeb0

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: build-docker
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/setup-go@v2
12+
with:
13+
go-version: 1.14.x
14+
- uses: actions/checkout@v2
15+
- name: Login to quay.io Docker Image Registry
16+
uses: docker/login-action@v1
17+
with:
18+
registry: quay.io
19+
username: "${{ secrets.QUAY_USER }}"
20+
password: "${{ secrets.QUAY_PASS }}"
21+
- run: make docker docker-publish
22+
env:
23+
DOCKER_IMAGE_TAG: ${{ github.event.release.tag_name }}
24+
- run: make docker docker-publish
25+
env:
26+
DOCKER_IMAGE_TAG: latest
File renamed without changes.

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
FROM circleci/golang:1.14 AS builder
2-
COPY . /go/src/github.com/prometheus-community/jiralert
3-
RUN mkdir -p /go/src/github.com/prometheus-community/jiralert && sudo chown -R circleci:circleci /go/src/github.com/prometheus-community/
1+
FROM golang:1.14 AS builder
42
WORKDIR /go/src/github.com/prometheus-community/jiralert
3+
COPY . /go/src/github.com/prometheus-community/jiralert
54
RUN GO111MODULE=on GOBIN=/tmp/bin make
65

76
FROM quay.io/prometheus/busybox-linux-amd64:latest
87

98
COPY --from=builder /go/src/github.com/prometheus-community/jiralert/jiralert /bin/jiralert
109

1110
ENTRYPOINT [ "/bin/jiralert" ]
12-

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
DOCKER_REPO ?= quay.io/jiralert
12
DOCKER_IMAGE_NAME ?= jiralert
23

34
include Makefile.common

0 commit comments

Comments
 (0)