Skip to content

TOTP

TOTP #4

Workflow file for this run

name: TOTP
permissions:
contents: read
id-token: write
attestations: write
defaults:
run:
shell: bash
on:
workflow_dispatch:
jobs:
gha:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-11-arm
- windows-2025
steps:
- uses: actions/checkout@v4
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-
- name: Generate OTP
if: runner.os == 'Windows'
run: |
echo "Installing totp-generator..."
npm install "totp-generator"
echo "running totp.mjs..."
node totp.mjs