Skip to content

Commit 44da3e5

Browse files
authored
Migrate project to the db-operator org (#1)
* Migrate the project to the `db-operator` organization * Update the `golang-ci` action version
1 parent caec1c5 commit 44da3e5

File tree

13 files changed

+25
-60
lines changed

13 files changed

+25
-60
lines changed

.github/workflows/image-publish.yaml

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
dockerhub_namespace: kloeckneri
9-
manufacturer: kloeckner-i
9+
manufacturer: db-operator
1010
product_name: db-auth-gateway
1111
go_version: "1.18"
1212
go_os: linux
@@ -15,6 +15,8 @@ env:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18+
permissions:
19+
packages: write
1820
strategy:
1921
matrix:
2022
include:
@@ -49,12 +51,6 @@ jobs:
4951
username: ${{ github.actor }}
5052
password: ${{ secrets.GITHUB_TOKEN }}
5153

52-
- name: Login to Dockerhub
53-
uses: docker/login-action@v1
54-
with:
55-
username: ${{ secrets.DOCKERHUB_USER }}
56-
password: ${{ secrets.DOCKERHUB_TOKEN }}
57-
5854
- name: Set action link variable
5955
run: echo "LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
6056

@@ -66,8 +62,6 @@ jobs:
6662
file: Dockerfile-ci
6763
platforms: ${{ env.go_os }}/${{ matrix.docker_arch }}
6864
tags: |
69-
${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
70-
${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
7165
ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
7266
ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
7367
labels: |
@@ -79,6 +73,8 @@ jobs:
7973
push_to_ghcr:
8074
runs-on: ubuntu-latest
8175
needs: build
76+
permissions:
77+
packages: write
8278
steps:
8379
- name: Set up Docker Buildx
8480
uses: docker/setup-buildx-action@v2
@@ -106,34 +102,3 @@ jobs:
106102
run: |
107103
docker manifest push ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:${{ github.event.release.tag_name }}
108104
docker manifest push ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:latest
109-
110-
push_to_dockerhub:
111-
runs-on: ubuntu-latest
112-
needs: build
113-
steps:
114-
- name: Set up Docker Buildx
115-
uses: docker/setup-buildx-action@v2
116-
117-
- name: Login to GitHub Container Registry
118-
uses: docker/login-action@v2
119-
with:
120-
username: ${{ secrets.DOCKERHUB_USER }}
121-
password: ${{ secrets.DOCKERHUB_TOKEN }}
122-
123-
- name: Create a docker manifest for a versioned container
124-
run: |
125-
docker manifest create ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }} \
126-
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-amd64 \
127-
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-arm64
128-
129-
- name: Create a manifest for the latest container
130-
run: |
131-
docker manifest create ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest \
132-
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-amd64 \
133-
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-arm64
134-
135-
- name: Push the manifest
136-
run: |
137-
docker manifest push ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}
138-
docker manifest push ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest
139-

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@v2
1717

1818
- name: Check Code Style
19-
uses: golangci/golangci-lint-action@v2
19+
uses: golangci/golangci-lint-action@v3
2020
with:
2121
version: v1.46.2
2222

cmd/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
"syscall"
2525
"time"
2626

27-
pkg "github.com/kloeckner-i/db-auth-gateway/internal"
28-
"github.com/kloeckner-i/db-auth-gateway/internal/api"
29-
"github.com/kloeckner-i/db-auth-gateway/internal/config"
27+
pkg "github.com/db-operator/db-auth-gateway/internal"
28+
"github.com/db-operator/db-auth-gateway/internal/api"
29+
"github.com/db-operator/db-auth-gateway/internal/config"
3030
"github.com/prometheus/client_golang/prometheus/promhttp"
3131
log "github.com/sirupsen/logrus"
3232
"github.com/spf13/cobra"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/kloeckner-i/db-auth-gateway
1+
module github.com/db-operator/db-auth-gateway
22

33
go 1.18
44

internal/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"io/ioutil"
2828
"time"
2929

30-
"github.com/kloeckner-i/db-auth-gateway/internal/util"
30+
"github.com/db-operator/db-auth-gateway/internal/util"
3131
"golang.org/x/oauth2"
3232
goauth "golang.org/x/oauth2/google"
3333
"google.golang.org/api/option"

internal/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import (
2929
"sync"
3030
"time"
3131

32-
"github.com/kloeckner-i/db-auth-gateway/internal/api"
33-
"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
32+
"github.com/db-operator/db-auth-gateway/internal/api"
33+
"github.com/db-operator/db-auth-gateway/internal/pubkey"
3434
"github.com/prometheus/client_golang/prometheus"
3535
"github.com/prometheus/client_golang/prometheus/promauto"
3636
log "github.com/sirupsen/logrus"

internal/config/config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424
"testing"
2525
"time"
2626

27-
"github.com/kloeckner-i/db-auth-gateway/internal/api"
28-
"github.com/kloeckner-i/db-auth-gateway/internal/config"
29-
"github.com/kloeckner-i/db-auth-gateway/internal/util"
27+
"github.com/db-operator/db-auth-gateway/internal/api"
28+
"github.com/db-operator/db-auth-gateway/internal/config"
29+
"github.com/db-operator/db-auth-gateway/internal/util"
3030
"github.com/stretchr/testify/assert"
3131
"golang.org/x/oauth2"
3232
"google.golang.org/api/option"

internal/gateway.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ import (
2929
"sync/atomic"
3030
"time"
3131

32-
"github.com/kloeckner-i/db-auth-gateway/internal/config"
33-
"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
34-
"github.com/kloeckner-i/db-auth-gateway/internal/util"
32+
"github.com/db-operator/db-auth-gateway/internal/config"
33+
"github.com/db-operator/db-auth-gateway/internal/pubkey"
34+
"github.com/db-operator/db-auth-gateway/internal/util"
3535
"github.com/prometheus/client_golang/prometheus"
3636
"github.com/prometheus/client_golang/prometheus/promauto"
3737
log "github.com/sirupsen/logrus"

internal/pubkey/authority_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"testing"
2525
"time"
2626

27-
"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
27+
"github.com/db-operator/db-auth-gateway/internal/pubkey"
2828
"github.com/stretchr/testify/assert"
2929
)
3030

internal/pubkey/pubkey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"errors"
2626
"fmt"
2727

28-
"github.com/kloeckner-i/db-auth-gateway/internal/util"
28+
"github.com/db-operator/db-auth-gateway/internal/util"
2929
log "github.com/sirupsen/logrus"
3030
)
3131

0 commit comments

Comments
 (0)