@@ -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
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
0 commit comments