Skip to content

Commit e81a968

Browse files
authored
Merge pull request #100 from lomik/docker
Docker
2 parents 7fcf0ab + 192b6bc commit e81a968

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/docker.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Docker images
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
tags: [ 'v*' ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
docker:
12+
name: Build image
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v2
17+
- name: Docker meta
18+
id: meta
19+
uses: docker/metadata-action@v3
20+
with:
21+
images: ghcr.io/${{ github.repository }}
22+
# create latest tag for branch events
23+
flavor: |
24+
latest=${{ github.event_name == 'push' && github.ref_type == 'branch' }}
25+
tags: |
26+
type=ref,event=branch
27+
type=ref,event=pr
28+
type=semver,pattern={{version}}
29+
type=semver,pattern={{major}}.{{minor}}
30+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
31+
- name: Login to DockerHub
32+
if: github.event_name != 'pull_request'
33+
uses: docker/login-action@v1
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Build and push
39+
id: docker_build
40+
uses: docker/build-push-action@v2
41+
with:
42+
# push for non-pr events
43+
push: ${{ github.event_name != 'pull_request' }}
44+
context: .
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}
47+

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Last releases are stable and ready for production use
1010
## TL;DR
1111
[Preconfigured docker-compose](https://github.com/lomik/graphite-clickhouse-tldr)
1212

13+
### Docker
14+
Docker images are available on [packages](https://github.com/lomik/carbon-clickhouse/pkgs/container/carbon-clickhouse) page.
15+
1316
## Build
1417
```sh
1518
# build binary

0 commit comments

Comments
 (0)