Skip to content

Commit 43022ec

Browse files
authored
Merge pull request #289 from blackpiglet/remove_gcr
Remove GCR and update some action versions.
2 parents 8138a3c + dc859a5 commit 43022ec

3 files changed

Lines changed: 11 additions & 44 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99

10+
- name: Check out the code
11+
uses: actions/checkout@v4
12+
1013
- name: Set up Go
11-
uses: actions/setup-go@v2
14+
uses: actions/setup-go@v5
1215
with:
13-
go-version: '1.22'
16+
go-version-file: 'go.mod'
1417
id: go
1518

16-
- name: Check out the code
17-
uses: actions/checkout@v2
1819

1920
- name: Make CI
2021
run: make ci

.github/workflows/push.yml

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,14 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717

18-
- name: Set up Go
19-
uses: actions/setup-go@v2
20-
with:
21-
go-version: '1.22'
22-
id: go
23-
2418
- name: Check out code into the Go module directory
25-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2620

27-
- id: 'auth'
28-
uses: 'google-github-actions/auth@v2'
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
2923
with:
30-
credentials_json: '${{ secrets.GCS_SA_KEY }}'
31-
- name: 'Setup Cloud SDK'
32-
uses: google-github-actions/setup-gcloud@v2
33-
- name: 'Use gcloud CLI'
34-
run: gcloud info
24+
go-version-file: 'go.mod'
25+
id: go
3526

3627
- name: Set up QEMU
3728
id: qemu
@@ -58,29 +49,9 @@ jobs:
5849
files: coverage.out
5950
verbose: true
6051

61-
# Use the JSON key in secret to login gcr.io
62-
- uses: 'docker/login-action@v2'
63-
with:
64-
registry: 'gcr.io' # or REGION.docker.pkg.dev
65-
username: '_json_key'
66-
password: '${{ secrets.GCR_SA_KEY }}'
67-
6852
# Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures.
6953
- name: Publish container image
7054
if: github.repository == 'vmware-tanzu/velero-plugin-for-microsoft-azure'
7155
run: |
7256
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
73-
VERSION=$(./hack/docker-push.sh | grep 'VERSION:' | awk -F: '{print $2}' | xargs)
74-
75-
# Upload velero-plugin-for-microsoft-azure image package to GCS
76-
source hack/ci/build_util.sh
77-
BIN=velero-plugin-for-microsoft-azure
78-
GCS_BUCKET=velero-builds
79-
VELERO_PLUGIN_IMAGE=${BIN}-${VERSION}
80-
VELERO_PLUGIN_IMAGE_FILE=${VELERO_PLUGIN_IMAGE}.tar.gz
81-
VELERO_PLUGIN_IMAGE_BACKUP_FILE=${VELERO_PLUGIN_IMAGE}-'build.'${GITHUB_RUN_NUMBER}.tar.gz
82-
83-
cp ${VELERO_PLUGIN_IMAGE_FILE} ${VELERO_PLUGIN_IMAGE_BACKUP_FILE}
84-
85-
uploader ${VELERO_PLUGIN_IMAGE_FILE} ${GCS_BUCKET}
86-
uploader ${VELERO_PLUGIN_IMAGE_BACKUP_FILE} ${GCS_BUCKET}
57+
./hack/docker-push.sh

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ PKG := github.com/vmware-tanzu/velero-plugin-for-microsoft-azure
2020

2121
# Where to push the docker image.
2222
REGISTRY ?= velero
23-
GCR_REGISTRY ?= gcr.io/velero-gcp
2423

2524
# Image name
2625
IMAGE ?= $(REGISTRY)/$(BIN)
27-
GCR_IMAGE ?= $(GCR_REGISTRY)/$(BIN)
2826

2927
# We allow the Dockerfile to be configurable to enable the use of custom Dockerfiles
3028
# that pull base images from different registries.
@@ -42,10 +40,8 @@ TAG_LATEST ?= false
4240

4341
ifeq ($(TAG_LATEST), true)
4442
IMAGE_TAGS ?= $(IMAGE):$(VERSION) $(IMAGE):latest
45-
GCR_IMAGE_TAGS ?= $(GCR_IMAGE):$(VERSION) $(GCR_IMAGE):latest
4643
else
4744
IMAGE_TAGS ?= $(IMAGE):$(VERSION)
48-
GCR_IMAGE_TAGS ?= $(GCR_IMAGE):$(VERSION)
4945
endif
5046

5147
ifeq ($(shell docker buildx inspect 2>/dev/null | awk '/Status/ { print $$2 }'), running)
@@ -107,7 +103,6 @@ endif
107103
--output=type=$(BUILDX_OUTPUT_TYPE) \
108104
--platform $(BUILDX_PLATFORMS) \
109105
$(addprefix -t , $(IMAGE_TAGS)) \
110-
$(addprefix -t , $(GCR_IMAGE_TAGS)) \
111106
--build-arg=GOPROXY=$(GOPROXY) \
112107
--build-arg=PKG=$(PKG) \
113108
--build-arg=BIN=$(BIN) \

0 commit comments

Comments
 (0)