Skip to content

Commit

Permalink
[v2.9] Upload CLI assets to GCS (#379)
Browse files Browse the repository at this point in the history
* upload assets to gcs

* fix upload path
  • Loading branch information
enrichman committed Jul 12, 2024
1 parent 93aad72 commit 6db3e90
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ jobs:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ;
secret/data/github/repo/${{ github.repository }}/google-auth/rancher/credentials token | GOOGLE_AUTH ;
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ env.GOOGLE_AUTH }}"

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -75,6 +81,17 @@ jobs:
find . -maxdepth 1 -type f ! -name sha256sum.txt -printf '%P\0' | xargs -0 sha256sum > sha256sum.txt
gh release upload $VERSION *.txt *.xz *.gz *.zip
- name: Upload Release assets to Google Cloud
uses: google-github-actions/upload-cloud-storage@v2
with:
path: dist/artifacts/${{ env.VERSION }}
destination: releases.rancher.com/cli2/${{ env.VERSION }}
glob: '*.*' # copy only the files in the path folder
parent: false
process_gcloudignore: false
headers: |-
cache-control: public,max-age=3600
- name: Docker Build
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 6db3e90

Please sign in to comment.