Skip to content

Commit 63946a9

Browse files
authored
Project migration (#1)
Project is migrated to the `db-operator` GitHub organization
1 parent e1b54c3 commit 63946a9

File tree

9 files changed

+63
-28
lines changed

9 files changed

+63
-28
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,60 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
17+
- uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.16'
20+
cache: false
1721
- name: Check Code Style
18-
uses: golangci/golangci-lint-action@v2
22+
uses: golangci/golangci-lint-action@v3
1923
with:
2024
version: v1.40.1
2125

2226
build:
2327
runs-on: ubuntu-latest
28+
permissions:
29+
packages: write
2430
needs: lint
2531
steps:
2632
- name: Checkout
27-
uses: actions/checkout@v2
33+
uses: actions/checkout@v3
2834
- name: Set up QEMU
29-
uses: docker/setup-qemu-action@v1
35+
uses: docker/setup-qemu-action@v2
3036
- name: Set up Docker Buildx
31-
uses: docker/setup-buildx-action@v1
37+
uses: docker/setup-buildx-action@v2
38+
- name: Login to GitHub Container Registry
39+
uses: docker/login-action@v2
40+
with:
41+
registry: ghcr.io
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN }}
44+
- name: Set action link variable
45+
run: echo "LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
3246
- name: Build
3347
id: docker_build
34-
uses: docker/build-push-action@v2
48+
uses: docker/build-push-action@v3
3549
with:
36-
tags: kloeckner-i/cloudish-sql:${{ github.sha }}
50+
push: true
51+
tags: |
52+
ghcr.io/${{ github.repository }}:${{ github.sha }}
53+
labels: |
54+
action_id=${{ github.action }}
55+
action_link=${{ env.LINK }}
56+
actor=${{ github.actor }}
57+
sha=${{ github.sha }}
58+
ref=${{ github.ref }}
3759
3860
test:
3961
runs-on: ubuntu-latest
4062
needs: build
4163
steps:
4264
- name: Checkout
43-
uses: actions/checkout@v2
65+
uses: actions/checkout@v3
4466
- name: Set up QEMU
45-
uses: docker/setup-qemu-action@v1
67+
uses: docker/setup-qemu-action@v2
4668
- name: Set up Docker Buildx
47-
uses: docker/setup-buildx-action@v1
69+
uses: docker/setup-buildx-action@v2
4870
- name: Test
4971
run: |
50-
make test
72+
make test

.github/workflows/release.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,35 @@ on:
77
jobs:
88
build_and_release:
99
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
1012
steps:
1113
- name: Checkout
12-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1315
- name: Set up QEMU
14-
uses: docker/setup-qemu-action@v1
16+
uses: docker/setup-qemu-action@v2
1517
- name: Set up Docker Buildx
16-
uses: docker/setup-buildx-action@v1
18+
uses: docker/setup-buildx-action@v2
1719
- name: Login to GitHub Container Registry
18-
uses: docker/login-action@v1
20+
uses: docker/login-action@v2
1921
with:
2022
registry: ghcr.io
2123
username: ${{ github.actor }}
2224
password: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Set action link variable
26+
run: echo "LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
2327
- name: Build and push
2428
id: docker_build
25-
uses: docker/build-push-action@v2
29+
uses: docker/build-push-action@v3
2630
with:
2731
push: true
28-
tags: ghcr.io/kloeckner-i/cloudish-sql:${{ github.event.release.tag_name }}
32+
tags: |
33+
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
34+
ghcr.io/${{ github.repository }}:${{ github.sha }}
35+
ghcr.io/${{ github.repository }}:latest
36+
labels: |
37+
action_id=${{ github.action }}
38+
action_link=${{ env.LINK }}
39+
actor=${{ github.actor }}
40+
sha=${{ github.sha }}
41+
ref=${{ github.ref }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENV CGO_ENABLED=0
44

55
RUN apk add --update --no-cache make
66

7-
WORKDIR /go/src/git.kci.rocks/DevOps/cloudish-sql
7+
WORKDIR /go/src/github.com/db-operator/cloudish-sql
88

99
# to reduce docker build time download dependency first before building
1010
COPY go.mod .
@@ -16,7 +16,7 @@ RUN make
1616

1717
FROM alpine:3.14
1818

19-
COPY --from=builder /go/src/git.kci.rocks/DevOps/cloudish-sql/target/cloudish-sql /usr/local/bin/cloudish-sql
19+
COPY --from=builder /go/src/github.com/db-operator/cloudish-sql/target/cloudish-sql /usr/local/bin/cloudish-sql
2020

2121
EXPOSE 8080/tcp
2222
ENTRYPOINT [ "/usr/local/bin/cloudish-sql" ]

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module git.kci.rocks/DevOps/cloudish-sql
1+
module github.com/db-operator/cloudish-sql
22

33
go 1.16
44

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"os"
66
"time"
77

8-
"git.kci.rocks/DevOps/cloudish-sql/mock"
9-
"git.kci.rocks/DevOps/cloudish-sql/pubkey"
8+
"github.com/db-operator/cloudish-sql/mock"
9+
"github.com/db-operator/cloudish-sql/pubkey"
1010
log "github.com/sirupsen/logrus"
1111
"github.com/spf13/cobra"
1212
"golang.org/x/term"

mock/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import (
2424
"strings"
2525
"time"
2626

27-
"git.kci.rocks/DevOps/cloudish-sql/pubkey"
28-
"git.kci.rocks/DevOps/cloudish-sql/util"
27+
"github.com/db-operator/cloudish-sql/pubkey"
28+
"github.com/db-operator/cloudish-sql/util"
2929
"github.com/gorilla/mux"
3030
"github.com/sdomino/scribble"
3131
log "github.com/sirupsen/logrus"

mock/database.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import (
3232
"sync"
3333
"time"
3434

35-
"git.kci.rocks/DevOps/cloudish-sql/pubkey"
36-
"git.kci.rocks/DevOps/cloudish-sql/util"
35+
"github.com/db-operator/cloudish-sql/pubkey"
36+
"github.com/db-operator/cloudish-sql/util"
3737
log "github.com/sirupsen/logrus"
3838
)
3939

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-
"git.kci.rocks/DevOps/cloudish-sql/pubkey"
27+
"github.com/db-operator/cloudish-sql/pubkey"
2828
"github.com/stretchr/testify/assert"
2929
)
3030

util/util_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package util_test
1919
import (
2020
"testing"
2121

22-
"git.kci.rocks/DevOps/cloudish-sql/util"
22+
"github.com/db-operator/cloudish-sql/util"
2323
"github.com/stretchr/testify/assert"
2424
)
2525

0 commit comments

Comments
 (0)