Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
PepikVaio committed Jan 9, 2024
1 parent 1817a8d commit cc80547
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:

- name: Set secret as an environment variable
run: echo "MY_SECRET_CODE=${{ secrets.MY_SECRET_CODE }}" >> $GITHUB_ENV

- name: Run script
env:
ENTERED_CODE: "someValue"
MY_SECRET_CODE: ${{ secrets.MY_SECRET_CODE }}
run: node $GITHUB_WORKSPACE/scripts/script.js
run: node scripts/script.js
3 changes: 2 additions & 1 deletion scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ if (typeof document !== 'undefined') {
// Kód pracující s DOMem
document.getElementById('showQRButton').addEventListener('click', function() {
var enteredCode = document.getElementById('codeInput').value;
var correctCode = 'kocka'; // Nahraďte skutečným kódem
//var correctCode = 'kocka'; // Nahraďte skutečným kódem
var correctCode = process.env.MY_SECRET_CODE; // Použití proměnné prostředí

if (enteredCode === correctCode) {
// Otevření vyskakovacího okna
Expand Down

0 comments on commit cc80547

Please sign in to comment.