mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-12 06:43:24 +03:00
29fc4d141f
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [azure/setup-helm](https://togithub.com/azure/setup-helm) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>azure/setup-helm (azure/setup-helm)</summary> ### [`v4`](https://togithub.com/Azure/setup-helm/releases/tag/v4) [Compare Source](https://togithub.com/azure/setup-helm/compare/v3...v4) Latest v4 release </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
name: 'Deploy to Cluster'
|
|
description: 'Deploy AFFiNE Cloud to cluster'
|
|
inputs:
|
|
build-type:
|
|
description: 'Align with App build type, canary|beta|stable|internal'
|
|
default: 'canary'
|
|
gcp-project-number:
|
|
description: 'GCP project number'
|
|
required: true
|
|
gcp-project-id:
|
|
description: 'GCP project id'
|
|
required: true
|
|
service-account:
|
|
description: 'Service account'
|
|
cluster-name:
|
|
description: 'Cluster name'
|
|
cluster-location:
|
|
description: 'Cluster location'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Setup Git short hash
|
|
shell: bash
|
|
run: |
|
|
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
|
|
- uses: azure/setup-helm@v4
|
|
- id: auth
|
|
uses: google-github-actions/auth@v2
|
|
with:
|
|
workload_identity_provider: 'projects/${{ inputs.gcp-project-number }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions-helm-deploy'
|
|
service_account: '${{ inputs.service-account }}'
|
|
token_format: 'access_token'
|
|
project_id: '${{ inputs.gcp-project-id }}'
|
|
|
|
- name: 'Setup gcloud cli'
|
|
uses: 'google-github-actions/setup-gcloud@v2'
|
|
with:
|
|
install_components: 'gke-gcloud-auth-plugin'
|
|
|
|
- id: get-gke-credentials
|
|
shell: bash
|
|
run: |
|
|
gcloud container clusters get-credentials ${{ inputs.cluster-name }} --region ${{ inputs.cluster-location }} --project ${{ inputs.gcp-project-id }}
|
|
|
|
- name: Deploy
|
|
shell: bash
|
|
run: node ./.github/actions/deploy/deploy.mjs
|
|
env:
|
|
BUILD_TYPE: '${{ inputs.build-type }}'
|