Skip to content

Commit

Permalink
chore: add CI for patroni-citus-k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
rophy committed Jul 13, 2024
1 parent 022bda7 commit 4e53aa0
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/patroni-citus-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: rophy/patroni-citus-k8s
on:
push:
paths:
- patroni-citus-k8s/**
pull_request:
paths:
- patroni-citus-k8s/**
jobs:
test:
if: github.ref != 'refs/heads/main' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./patroni-citus-k8s
dockerfile: ./patroni-citus-k8s/Dockerfile
push: false
build-and-push:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set variables
run: |
VER=$(cat patroni-citus-k8s/version.txt)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./patroni-citus-k8s
dockerfile: ./patroni-citus-k8s/Dockerfile
push: true
tags: rophy/patroni-citus-k8s:${{ env.VERSION }}

0 comments on commit 4e53aa0

Please sign in to comment.