forked from crossplane-contrib/provider-gcp
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from tidbcloud/support-pause
upgrade crossplane-runtime to v0.19.3
- Loading branch information
Showing
3 changed files
with
193 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 | ||
|
@@ -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') }} | ||
|
@@ -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/[email protected] | ||
id: tagName | ||
|
||
- name: Update the image tag, use the tag name as the image tag | ||
if: steps.tagName.outputs.tag != '' | ||
run: | | ||
|
@@ -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: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.