Skip to content

Commit 2031003

Browse files
authored
Transfer from shayonj -> pgflo (#50)
* Transfer from shayonj -> pgflo * Fix date showed in version
1 parent 91c41ed commit 2031003

36 files changed

+99
-70
lines changed

.github/workflows/release-and-docker.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,60 @@ jobs:
4747
with:
4848
buildkitd-flags: --debug
4949

50-
- name: Login to DockerHub
50+
- name: Extract metadata (shayonj)
51+
id: meta_shayonj
52+
uses: docker/metadata-action@v5
53+
with:
54+
images: docker.io/shayonj/pg_flo
55+
tags: |
56+
type=semver,pattern={{version}}
57+
type=semver,pattern={{major}}.{{minor}}
58+
type=semver,pattern={{major}}
59+
60+
- name: Login to DockerHub (shayonj)
5161
uses: docker/login-action@v3
5262
with:
5363
username: ${{ secrets.DOCKERHUB_USERNAME }}
5464
password: ${{ secrets.DOCKERHUB_TOKEN }}
5565

56-
- name: Extract metadata
57-
id: meta
66+
- name: Build and push (shayonj)
67+
uses: docker/build-push-action@v5
68+
with:
69+
context: .
70+
platforms: linux/amd64,linux/arm64
71+
push: true
72+
tags: ${{ steps.meta_shayonj.outputs.tags }}
73+
labels: ${{ steps.meta_shayonj.outputs.labels }}
74+
build-args: |
75+
VERSION=${{ github.ref_name }}
76+
COMMIT=${{ github.sha }}
77+
DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
78+
79+
- name: Extract metadata (pgflo)
80+
id: meta_pgflo
5881
uses: docker/metadata-action@v5
5982
with:
60-
images: docker.io/shayonj/pg_flo
83+
images: docker.io/pgflo/pg_flo
6184
tags: |
6285
type=semver,pattern={{version}}
6386
type=semver,pattern={{major}}.{{minor}}
6487
type=semver,pattern={{major}}
6588
66-
- name: Build and push
89+
- name: Login to DockerHub (pgflo)
90+
uses: docker/login-action@v3
91+
with:
92+
username: ${{ secrets.PG_FLO_DOCKER_HUB_USERNAME }}
93+
password: ${{ secrets.PG_FLO_DOCKER_HUB_TOKEN }}
94+
95+
- name: Build and push (pgflo)
6796
uses: docker/build-push-action@v5
6897
with:
6998
context: .
7099
platforms: linux/amd64,linux/arm64
71100
push: true
72-
tags: ${{ steps.meta.outputs.tags }}
73-
labels: ${{ steps.meta.outputs.labels }}
101+
tags: ${{ steps.meta_pgflo.outputs.tags }}
102+
labels: ${{ steps.meta_pgflo.outputs.labels }}
74103
build-args: |
75104
VERSION=${{ github.ref_name }}
76105
COMMIT=${{ github.sha }}
77-
DATE=${{ format('2006-01-02T15:04:05Z') }}
106+
DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')

.goreleaser.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ builds:
1414
- arm64
1515
ldflags:
1616
- -s -w
17-
- -X github.com/shayonj/pg_flo/cmd.version={{.Version}}
18-
- -X github.com/shayonj/pg_flo/cmd.commit={{.Commit}}
19-
- -X github.com/shayonj/pg_flo/cmd.date={{.Date}}
17+
- -X github.com/pgflo/pg_flo/cmd.version={{.Version}}
18+
- -X github.com/pgflo/pg_flo/cmd.commit={{.Commit}}
19+
- -X github.com/pgflo/pg_flo/cmd.date={{.Date}}
2020
binary: pg_flo
2121

2222
archives:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ ARG COMMIT=none
66
ARG DATE=unknown
77
RUN CGO_ENABLED=0 GOOS=linux go build -v \
88
-ldflags "-s -w \
9-
-X 'github.com/shayonj/pg_flo/cmd.version=${VERSION}' \
10-
-X 'github.com/shayonj/pg_flo/cmd.commit=${COMMIT}' \
11-
-X 'github.com/shayonj/pg_flo/cmd.date=${DATE}'" \
9+
-X 'github.com/pgflo/pg_flo/cmd.version=${VERSION}' \
10+
-X 'github.com/pgflo/pg_flo/cmd.commit=${COMMIT}' \
11+
-X 'github.com/pgflo/pg_flo/cmd.date=${DATE}'" \
1212
-o pg_flo .
1313

1414
FROM alpine:latest

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# <img src="internal/pg_flo_logo.png" alt="pg_flo logo" width="40" align="center"> pg_flo
22

3-
[![CI](https://github.com/shayonj/pg_flo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/shayonj/pg_flo/actions/workflows/ci.yml)
4-
[![Integration](https://github.com/shayonj/pg_flo/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/shayonj/pg_flo/actions/workflows/integration.yml)
5-
[![Release](https://img.shields.io/github/v/release/shayonj/pg_flo?style=flat&color=#959DA5&sort=semver)](https://github.com/shayonj/pg_flo/releases/latest)
6-
[![Docker Image](https://img.shields.io/docker/v/shayonj/pg_flo?style=flat&label=docker&color=#959DA5&label=docker&sort=semver)](https://hub.docker.com/r/shayonj/pg_flo/tags)
3+
[![CI](https://github.com/pgflo/pg_flo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/pgflo/pg_flo/actions/workflows/ci.yml)
4+
[![Integration](https://github.com/pgflo/pg_flo/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/pgflo/pg_flo/actions/workflows/integration.yml)
5+
[![Release](https://img.shields.io/github/v/release/pgflo/pg_flo?style=flat&color=#959DA5&sort=semver)](https://github.com/pgflo/pg_flo/releases/latest)
6+
[![Docker Image](https://img.shields.io/docker/v/pgflo/pg_flo?style=flat&label=docker&color=#959DA5&label=docker&sort=semver)](https://hub.docker.com/r/pgflo/pg_flo/tags)
77

88
> The easiest way to move and transform data between PostgreSQL databases using Logical Replication.
99
@@ -37,7 +37,7 @@
3737
### 1. Install
3838

3939
```shell
40-
docker pull shayonj/pg_flo:latest
40+
docker pull pgflo/pg_flo:latest
4141
```
4242

4343
### 2. Configure
@@ -62,14 +62,14 @@ docker run -d --name pg_flo_nats \
6262
docker run -d --name pg_flo_replicator \
6363
--network host \
6464
-v /path/to/config.yaml:/etc/pg_flo/config.yaml \
65-
shayonj/pg_flo:latest \
65+
pgflo/pg_flo:latest \
6666
replicator --config /etc/pg_flo/config.yaml
6767

6868
# Start worker
6969
docker run -d --name pg_flo_worker \
7070
--network host \
7171
-v /path/to/config.yaml:/etc/pg_flo/config.yaml \
72-
shayonj/pg_flo:latest \
72+
pgflo/pg_flo:latest \
7373
worker postgres --config /etc/pg_flo/config.yaml
7474
```
7575

cmd/root.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import (
88
"strings"
99
"syscall"
1010

11+
"github.com/pgflo/pg_flo/pkg/pgflonats"
12+
"github.com/pgflo/pg_flo/pkg/replicator"
13+
"github.com/pgflo/pg_flo/pkg/routing"
14+
"github.com/pgflo/pg_flo/pkg/rules"
15+
"github.com/pgflo/pg_flo/pkg/sinks"
16+
"github.com/pgflo/pg_flo/pkg/worker"
1117
"github.com/rs/zerolog"
1218
"github.com/rs/zerolog/log"
13-
"github.com/shayonj/pg_flo/pkg/pgflonats"
14-
"github.com/shayonj/pg_flo/pkg/replicator"
15-
"github.com/shayonj/pg_flo/pkg/routing"
16-
"github.com/shayonj/pg_flo/pkg/rules"
17-
"github.com/shayonj/pg_flo/pkg/sinks"
18-
"github.com/shayonj/pg_flo/pkg/worker"
1919
"github.com/spf13/cobra"
2020
"github.com/spf13/pflag"
2121
"github.com/spf13/viper"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/shayonj/pg_flo
1+
module github.com/pgflo/pg_flo
22

33
go 1.21.5
44

internal/examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ docker run -d --name pg_flo_nats \
1818
docker run -d --name pg_flo_replicator \
1919
--network host \
2020
-v /path/to/config.yaml:/etc/pg_flo/config.yaml \
21-
shayonj/pg_flo:latest \
21+
pgflo/pg_flo:latest \
2222
replicator --config /etc/pg_flo/config.yaml
2323

2424
# Start worker
2525
docker run -d --name pg_flo_worker \
2626
--network host \
2727
-v /path/to/config.yaml:/etc/pg_flo/config.yaml \
28-
shayonj/pg_flo:latest \
28+
pgflo/pg_flo:latest \
2929
worker postgres --config /etc/pg_flo/config.yaml
3030
```
3131

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"os"
66

7-
"github.com/shayonj/pg_flo/cmd"
7+
"github.com/pgflo/pg_flo/cmd"
88
)
99

1010
func main() {

pkg/replicator/base_replicator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"github.com/jackc/pglogrepl"
1313
"github.com/jackc/pgx/v5"
1414
"github.com/jackc/pgx/v5/pgproto3"
15+
"github.com/pgflo/pg_flo/pkg/utils"
1516
"github.com/rs/zerolog"
1617
"github.com/rs/zerolog/log"
17-
"github.com/shayonj/pg_flo/pkg/utils"
1818
)
1919

2020
func init() {

pkg/replicator/copy_and_stream_replicator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/jackc/pglogrepl"
1313
"github.com/jackc/pgx/v5"
14-
"github.com/shayonj/pg_flo/pkg/utils"
14+
"github.com/pgflo/pg_flo/pkg/utils"
1515
)
1616

1717
func (r *CopyAndStreamReplicator) NewBaseReplicator() *BaseReplicator {

0 commit comments

Comments
 (0)