Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Add Github Actions workflow #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/evryfs-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- v*-evryfs

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true

# Runs a single command using the runners shell
- name: Build builder image
run: make -C docker/builder image

# Runs a set of commands using the runners shell
- name: Build ClickHouse
run: make -C docker/builder build

- name: Docker Login
run: echo "$GITHUB_TOKEN" | docker login -u "$GITHUB_ACTOR" --password-stdin docker.pkg.github.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Tag and Push Image
run: |
tag=${GITHUB_REF##*/}
final_repo=docker.pkg.github.com/${{ github.repository }}/clickhouse-server:${tag}
docker tag yandex/clickhouse-server $final_repo
docker push $final_repo