continuous-integration-images/.github/workflows/clickhouse.yml

129 lines
3.2 KiB
YAML
Raw Permalink Normal View History

2023-02-07 02:39:11 +00:00
name: ClickHouse
on:
push:
branches:
- master
jobs:
node1:
name: Node 1
runs-on: ubuntu-latest
timeout-minutes: 300
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
2023-02-07 13:21:59 +00:00
images: ghcr.io/aldy505/clickhouse-node1
2023-02-07 02:39:11 +00:00
flavor: |
latest=true
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
2023-02-07 13:18:36 +00:00
context: "{{defaultContext}}:clickhouse"
2023-02-07 09:59:55 +00:00
file: "Dockerfile.node1"
2023-02-07 02:39:11 +00:00
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
node2:
name: Node 2
runs-on: ubuntu-latest
timeout-minutes: 300
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
2023-02-07 13:21:59 +00:00
images: ghcr.io/aldy505/clickhouse-node2
2023-02-07 02:39:11 +00:00
flavor: |
latest=true
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
2023-02-07 13:18:36 +00:00
context: "{{defaultContext}}:clickhouse"
2023-02-07 09:59:55 +00:00
file: "Dockerfile.node2"
2023-02-07 02:39:11 +00:00
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
node3:
name: Node 3
runs-on: ubuntu-latest
timeout-minutes: 300
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
2023-02-07 13:21:59 +00:00
images: ghcr.io/aldy505/clickhouse-node3
2023-02-07 02:39:11 +00:00
flavor: |
latest=true
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
2023-02-07 13:18:36 +00:00
context: "{{defaultContext}}:clickhouse"
2023-02-07 09:59:55 +00:00
file: "Dockerfile.node3"
2023-02-07 02:39:11 +00:00
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}