Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
How to access yaml variables in javascript

How to access yml variables in javascript ?

I am trying to make a static webpage and I want that only the person with the password that I will give will be able to enter but the thing I also want to hide is so not anyone seeing my repo will be able to see it.

In the main.yml :

- name: run custom code
        run: console.log($message)
        env:
          message: "starting message"
          KEY: ${{ secrets.KEY }}
  

and I want to access it here in the index.js to check if user-input is similar to the password I set in the secrets:


$(document).ready(function(){
        var key = $KEY;//here
        
        $("#submit-btn").click(function(){
            alert("button clicked");
        var nameInput = $("#name").val();
        var keyInput = $("#password").val();
        if (nameInput == "Arihant" && keyInput == key) {
            alert("welcome");
            window.location.replace("./machine.html")

        }else{
            alert("Wrong User");
            
        }
});
});

pls, tell me how I can do it?
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This article might be help you out: Reading and Writing YAML to a File in Node.js/JavaScript

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda