diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a1fbcb71c..575a25a3f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,6 +24,10 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write strategy: fail-fast: false @@ -35,11 +39,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -50,7 +56,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -64,4 +70,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a358b229f..f92254ca3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,39 +15,29 @@ on: schedule: - cron: 0 0 * * 1-5 +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest name: Build steps: - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Setup node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: '20' check-latest: false - - name: angular build cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: ./.angular - key: angular-cache - - name: node_modules cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - id: node_modules_cache - with: - path: ./node_modules - key: ${{ runner.os }}-20-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-20- - name: Install deps - if: steps.node_modules_cache.outputs.cache-hit != 'true' - run: | - npm ci + run: npm ci - name: Build run: ./tools/build.sh - name: 'Upload Artifact' - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: angularfire-${{ github.run_id }} path: dist @@ -64,25 +54,18 @@ jobs: name: Test Node ${{ matrix.node }} (${{ matrix.os }}) steps: - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Setup node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: ${{ matrix.node }} check-latest: true - - name: node_modules cache - id: node_modules_cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: ./node_modules - key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.node }}- - name: Install deps - if: steps.node_modules_cache.outputs.cache-hit != 'true' run: npm ci - name: Download Artifacts - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: angularfire-${{ github.run_id }} path: dist @@ -106,35 +89,23 @@ jobs: fail-fast: false steps: - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Setup node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 20 check-latest: false - name: Setup java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 + uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 with: distribution: 'temurin' java-version: '21' - - name: node_modules cache - id: node_modules_cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: ./node_modules - key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.node }}- - name: Install deps - if: steps.node_modules_cache.outputs.cache-hit != 'true' run: npm ci - - name: Firebase emulator cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: ~/.cache/firebase/emulators - key: firebase_emulators - name: Download Artifacts - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: angularfire-${{ github.run_id }} path: dist @@ -151,22 +122,15 @@ jobs: fail-fast: false steps: - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false - name: Setup node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: ${{ matrix.node }} check-latest: true - - name: node_modules cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - id: node_modules_cache - with: - path: ./node_modules - key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.node }}- - name: Install deps - if: steps.node_modules_cache.outputs.cache-hit != 'true' run: npm ci #- name: Lint # run: npm run lint @@ -176,13 +140,8 @@ jobs: run: | npm run build:jasmine npm run test:node - - name: Firebase emulator cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: ~/.cache/firebase/emulators - key: firebase_emulators - name: Setup java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 + uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 with: distribution: 'temurin' java-version: '21' @@ -206,13 +165,13 @@ jobs: if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }} steps: - name: Setup node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: '20' registry-url: 'https://registry.npmjs.org' check-latest: false - name: 'Download Artifacts' - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: angularfire-${{ github.run_id }} path: dist