Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda