Skip to content

Commit

Permalink
Merge pull request #40 from tidbcloud/support-pause
Browse files Browse the repository at this point in the history
upgrade crossplane-runtime to v0.19.3
  • Loading branch information
liubog2008 authored Jul 24, 2024
2 parents f7ccbb4 + d3c6414 commit d0dcd0c
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 91 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

# This job will only be triggered when a PR is merged to `pingcap/provider-gcp` branch
# This job will only be triggered when a PR is merged to `pingcap/provider-gcp` branch
# or a tag is pushed.
on:
push:
Expand All @@ -14,7 +14,7 @@ on:
- pingcap/provider-gcp

env:
GO_VERSION: '1.18'
GO_VERSION: '1.21'
GCR_REG: gcr.io/pingcap-public/crossplane
PROJECT_ID: pingcap-public
IMAGE_NAME: provider-gcp
Expand All @@ -23,28 +23,28 @@ env:

jobs:
push-the-image:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- name: Find the Go Build Cache
id: go
run: echo "::set-output name=cache::$(go env GOCACHE)"
run: echo "cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT

- name: Cache the Go Build Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.go.outputs.cache }}
key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-build-publish-artifacts-

- name: Cache Go Dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
Expand All @@ -53,28 +53,28 @@ jobs:
- name: Build the binary
working-directory: ./
run: GOOS=linux CGO_ENABLED=0 go build -o docker/crossplane-gcp-provider cmd/provider/main.go

- id: auth
uses: google-github-actions/auth@v0.4.0
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.PUB_GCR_SA_KEY }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.3.0
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ env.PROJECT_ID }}

- name: Test gcloud CLI
run: gcloud info
run: gcloud auth list

- name: Configure docker to use the gcloud command-line tool as a credential helper
run: |
gcloud auth configure-docker -q
gcloud auth configure-docker gcr.io --quiet
- name: Get tag name if any
uses: olegtarasov/get-tag@v2.1
id: tagName

- name: Update the image tag, use the tag name as the image tag
if: steps.tagName.outputs.tag != ''
run: |
Expand All @@ -83,12 +83,12 @@ jobs:
- name: Build docker image
run: |-
cd docker && docker build -t ${{ env.GCR_REG }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} .
- name: Push the image to GCR - dev
if: github.ref == 'refs/heads/pingcap/provider-gcp'
run: |
docker push ${{ env.GCR_REG }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- name: Push the image to GCR - tag
if: github.ref != 'refs/heads/pingcap/provider-gcp'
run: |
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@ require (
cloud.google.com/go/pubsub v1.3.1
cloud.google.com/go/redis v1.4.0
cloud.google.com/go/storage v1.22.1
github.com/crossplane/crossplane-runtime v0.18.0
github.com/crossplane/crossplane-runtime v0.19.3
github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e
github.com/crossplane/provider-gcp/apis/dns/v1alpha1 v0.0.0-00010101000000-000000000000
github.com/crossplane/provider-gcp/apis/vpcpeering/v1beta1 v0.0.0-00010101000000-000000000000
github.com/google/go-cmp v0.5.8
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go v1.0.3
github.com/googleapis/gax-go/v2 v2.4.0
github.com/imdario/mergo v0.3.12
github.com/mitchellh/copystructure v1.0.0
github.com/onsi/gomega v1.20.1
github.com/onsi/gomega v1.24.2
github.com/pkg/errors v0.9.1
golang.org/x/net v0.0.0-20220909164309-bea034e7d591
golang.org/x/net v0.4.0
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1
google.golang.org/api v0.84.0
google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90
google.golang.org/grpc v1.49.0
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6
honnef.co/go/tools v0.0.1-2020.1.5 // indirect
k8s.io/api v0.25.0
k8s.io/apimachinery v0.25.2
k8s.io/client-go v0.25.0
sigs.k8s.io/controller-runtime v0.13.0
sigs.k8s.io/controller-tools v0.9.2
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
sigs.k8s.io/controller-runtime v0.14.1
sigs.k8s.io/controller-tools v0.11.1
)

replace github.com/crossplane/provider-gcp/apis/vpcpeering/v1beta1 => ./apis/vpcpeering/v1beta1
Expand Down
Loading

0 comments on commit d0dcd0c

Please sign in to comment.