Is there a way to pass GitHub Actions environment variables to the Kubernetes index file?
The workflow file, this part will get the run number:
- name: Taggig
run: |
echo "imageTag=${{ github.run_number }}" >> $GITHUB_ENV
And I want to pass it to the index like -
Example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: my-image:{{ env.imageTag }}