Access a field from GitHub artifact



How can we use pipeline expression (or another way) to extract (access) a field from a github expected artifact (yaml file)?
(I want to use replicas number described in a .yaml file on the github to set the Replicas parameter at a Scale manifest stage.)

Example, I have a helm value file on GitHub that contains the following replicaCount field.


replicaCount: 1