I'm trying to make use of variables instead of secrets because some of the secrets are not really secrets so wanted to make it nicer, however, I'm having a bit of a fight here.
The first one runs ok because I'm able to use the environment: name: development
. However on the build_deploy
job, because I'm using a reusable workflow I'm not able to use the environment: name: development
.
How can I fix this, or is this even the correct way to do it?
Thanks in advance! :)
name: Deploy
on:
workflow_dispatch:
jobs:
check-env-vars:
runs-on: ubuntu-latest
environment:
name: development
steps:
- name : Output vars
run: |
echo "cluster-name ${{vars.CLUSTER_NAME}}"
echo "region ${{vars.REGION}}"
echo "projectid ${{vars.PROJECT_ID}}"
build_deploy:
uses: owner/repo/.github/workflows/build_deploy.yaml@master
with:
project-id: ${{ vars.PROJECT_ID }}
environment: development
cluster-name: ${{ vars.CLUSTER_NAME }}
region: ${{ vars.REGION }}