From 69205c47bf49db1bc99ae19b6fa67f386da8339d Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Thu, 11 Jun 2020 12:58:08 +0200 Subject: [PATCH] Add Github Actions workflow Builds and pushes Docker image on `v*-evryfs` tags --- .github/workflows/evryfs-tag.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/evryfs-tag.yml diff --git a/.github/workflows/evryfs-tag.yml b/.github/workflows/evryfs-tag.yml new file mode 100644 index 000000000000..38384e7bb790 --- /dev/null +++ b/.github/workflows/evryfs-tag.yml @@ -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 +