Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 5 additions & 40 deletions .github/workflows/image-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
dockerhub_namespace: kloeckneri
manufacturer: kloeckner-i
manufacturer: db-operator
product_name: db-auth-gateway
go_version: "1.18"
go_os: linux
Expand All @@ -15,6 +15,8 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
include:
Expand Down Expand Up @@ -49,12 +51,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set action link variable
run: echo "LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV

Expand All @@ -66,8 +62,6 @@ jobs:
file: Dockerfile-ci
platforms: ${{ env.go_os }}/${{ matrix.docker_arch }}
tags: |
${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:latest-${{ matrix.go_arch }}
ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-${{ matrix.go_arch }}
labels: |
Expand All @@ -79,6 +73,8 @@ jobs:
push_to_ghcr:
runs-on: ubuntu-latest
needs: build
permissions:
packages: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -106,34 +102,3 @@ jobs:
run: |
docker manifest push ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:${{ github.event.release.tag_name }}
docker manifest push ghcr.io/${{ env.manufacturer }}/${{ env.product_name }}:latest

push_to_dockerhub:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create a docker manifest for a versioned container
run: |
docker manifest create ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }} \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-amd64 \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}-arm64

- name: Create a manifest for the latest container
run: |
docker manifest create ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-amd64 \
--amend ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest-arm64

- name: Push the manifest
run: |
docker manifest push ${{ env.dockerhub_namespace }}/${{ env.product_name }}:${{ github.event.release.tag_name }}
docker manifest push ${{ env.dockerhub_namespace }}/${{ env.product_name }}:latest

2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v2

- name: Check Code Style
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2

Expand Down
6 changes: 3 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"syscall"
"time"

pkg "github.com/kloeckner-i/db-auth-gateway/internal"
"github.com/kloeckner-i/db-auth-gateway/internal/api"
"github.com/kloeckner-i/db-auth-gateway/internal/config"
pkg "github.com/db-operator/db-auth-gateway/internal"
"github.com/db-operator/db-auth-gateway/internal/api"
"github.com/db-operator/db-auth-gateway/internal/config"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kloeckner-i/db-auth-gateway
module github.com/db-operator/db-auth-gateway

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"io/ioutil"
"time"

"github.com/kloeckner-i/db-auth-gateway/internal/util"
"github.com/db-operator/db-auth-gateway/internal/util"
"golang.org/x/oauth2"
goauth "golang.org/x/oauth2/google"
"google.golang.org/api/option"
Expand Down
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"sync"
"time"

"github.com/kloeckner-i/db-auth-gateway/internal/api"
"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
"github.com/db-operator/db-auth-gateway/internal/api"
"github.com/db-operator/db-auth-gateway/internal/pubkey"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
log "github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"testing"
"time"

"github.com/kloeckner-i/db-auth-gateway/internal/api"
"github.com/kloeckner-i/db-auth-gateway/internal/config"
"github.com/kloeckner-i/db-auth-gateway/internal/util"
"github.com/db-operator/db-auth-gateway/internal/api"
"github.com/db-operator/db-auth-gateway/internal/config"
"github.com/db-operator/db-auth-gateway/internal/util"
"github.com/stretchr/testify/assert"
"golang.org/x/oauth2"
"google.golang.org/api/option"
Expand Down
6 changes: 3 additions & 3 deletions internal/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"sync/atomic"
"time"

"github.com/kloeckner-i/db-auth-gateway/internal/config"
"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
"github.com/kloeckner-i/db-auth-gateway/internal/util"
"github.com/db-operator/db-auth-gateway/internal/config"
"github.com/db-operator/db-auth-gateway/internal/pubkey"
"github.com/db-operator/db-auth-gateway/internal/util"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/pubkey/authority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"
"time"

"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
"github.com/db-operator/db-auth-gateway/internal/pubkey"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/pubkey/pubkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"errors"
"fmt"

"github.com/kloeckner-i/db-auth-gateway/internal/util"
"github.com/db-operator/db-auth-gateway/internal/util"
log "github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/pubkey/pubkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"encoding/pem"
"testing"

"github.com/kloeckner-i/db-auth-gateway/internal/pubkey"
"github.com/db-operator/db-auth-gateway/internal/pubkey"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package util_test
import (
"testing"

"github.com/kloeckner-i/db-auth-gateway/internal/util"
"github.com/db-operator/db-auth-gateway/internal/util"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"time"

_ "github.com/jackc/pgx/v4/stdlib"
"github.com/kloeckner-i/db-auth-gateway/internal/api"
"github.com/kloeckner-i/db-auth-gateway/internal/util"
"github.com/db-operator/db-auth-gateway/internal/api"
"github.com/db-operator/db-auth-gateway/internal/util"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"golang.org/x/oauth2"
Expand Down