Skip to content

use value from secret #7

use value from secret

use value from secret #7

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
# TODO Project number from secrets
name: Build and Deploy to GKE
on:
push:
branches:
- feat/pipeline
env:
ARTIFACTORY_HOST: europe-west4-docker.pkg.dev
ARTIFACTORY_REPO: impierce-repo
GKE_CLUSTER: impierce-cluster
GKE_ZONE: europe-west4-a
IMAGE: unicore
APISIX_PATH: react-app
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: dev
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Auth"
uses: "google-github-actions/auth@v2"
with:
token_format: "access_token"
workload_identity_provider: projects/${{secrets.PROJECT_NR}}/locations/global/workloadIdentityPools/workload-ip/providers/workload-ip-provider
service_account: k8s-user@${{secrets.PROJECT_ID}}.iam.gserviceaccount.com
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
- name: "Use gcloud CLI"
run: "gcloud info"
- name: Create secret
run: |

Check failure on line 57 in .github/workflows/push.yaml

View workflow run for this annotation

GitHub Actions / Build and Deploy to GKE

Invalid workflow file

The workflow is not valid. .github/workflows/push.yaml (Line: 57, Col: 14): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.AGENT_STORE_DB_CONNECTION_STRING
kubectl -n ingress-apisix delete secret unicore-db-secret --ignore-not-found
kubectl -n ingress-apisix create secret generic unicore-db-secret \
--from-literal='connection-string=${{ secret.AGENT_STORE_DB_CONNECTION_STRING }}'
- name: Build
working-directory: ".pipeline"
run: chmod u+x ./build.sh && ./build.sh
# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@v2
with:
cluster_name: ${{ env.GKE_CLUSTER }}
project_id: ${{ env.PROJECT_ID }}
location: ${{ env.GKE_ZONE }}
## Deploy the Docker image to the GKE cluster
- name: Deploy
working-directory: ".pipeline"
run: chmod u+x ./deploy.sh && ./deploy.sh