Skip to content

newchanges-3

newchanges-3 #16

Workflow file for this run

name: Maven Deploy
on:
push:
branches:
- main
- new2 # Trigger the workflow on pushes to the main branch
jobs:
deploy:
name: Deploy to Maven Repository
runs-on: ubuntu-latest
env:
GCP_SERVICE_ACCOUNT_KEY: ${{ env.GCP_SERVICE_ACCOUNT_KEY }} # Define the environment variable here

Check failure on line 15 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Maven Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 15, Col: 32): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GCP_SERVICE_ACCOUNT_KEY
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: build
run: docker build -t us-central1-docker.pkg.dev/studentbase-v1/studentbase/backend:latest .
- name: Decode and write GCP service account key to file
run: |
echo "$GCP_SERVICE_ACCOUNT_KEY" > /home/runner/gcloud-key.json
echo "$GCP_SERVICE_ACCOUNT_KEY"
cat /home/runner/gcloud-key.json
shell: /usr/bin/bash -e {0}
- name: auth
run: gcloud auth activate-service-account [email protected] --key-file=/home/runner/gcloud-key.json --project=studentbase-v1
- name: push
run: docker push us-central1-docker.pkg.dev/studentbase-v1/studentbase/backend:latest
- name: deploy
run: kubectl apply -f ./scripts/deploy.yml