diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index 4e4485a48a..64bf4a3274 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -51,21 +51,16 @@ jobs: with: fetch-depth: 0 - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - uses: pnpm/action-setup@v4 name: Install pnpm with: run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + - name: Install Node + uses: actions/setup-node@v5 + with: + node-version-file: ".nvmrc" + cache: 'pnpm' - name: Get API Version id: vars @@ -76,14 +71,6 @@ jobs: API_VERSION=$([[ -n "$IS_TAGGED" ]] && echo "$PACKAGE_LOCK_VERSION" || echo "${PACKAGE_LOCK_VERSION}+${GIT_SHA}") echo "API_VERSION=${API_VERSION}" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - name: Install dependencies run: | cd ${{ github.workspace }} diff --git a/.github/workflows/deploy-storybook.yml b/.github/workflows/deploy-storybook.yml index 7c2940ebf0..18d10c2a15 100644 --- a/.github/workflows/deploy-storybook.yml +++ b/.github/workflows/deploy-storybook.yml @@ -22,16 +22,17 @@ jobs: - name: Checkout uses: actions/checkout@v5 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '22.18.0' - - uses: pnpm/action-setup@v4 name: Install pnpm with: run_install: false + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version-file: ".nvmrc" + cache: 'pnpm' + - name: Cache APT Packages uses: awalsh128/cache-apt-pkgs-action@v1.5.3 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a46861ee5b..bd6ee3ca51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,10 @@ on: branches: - main +permissions: + contents: write + pull-requests: write + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} @@ -21,10 +25,16 @@ jobs: - name: Checkout repo uses: actions/checkout@v5 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + - name: Install Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version-file: ".nvmrc" + cache: 'pnpm' - name: Cache APT Packages uses: awalsh128/cache-apt-pkgs-action@v1.5.3 @@ -32,25 +42,6 @@ jobs: packages: bash procps python3 libvirt-dev jq zstd git build-essential libvirt-daemon-system php-cli version: 1.0 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - run_install: false - - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - name: PNPM Install run: pnpm install --frozen-lockfile @@ -173,29 +164,16 @@ jobs: - name: Checkout repo uses: actions/checkout@v5 - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - uses: pnpm/action-setup@v4 name: Install pnpm with: run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v4 - name: Setup pnpm cache + - name: Install Node + uses: actions/setup-node@v5 with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + node-version-file: ".nvmrc" + cache: 'pnpm' - name: Cache APT Packages uses: awalsh128/cache-apt-pkgs-action@v1.5.3 @@ -226,7 +204,7 @@ jobs: id: buildnumber uses: onyxmueller/build-tag-number@v1 with: - token: ${{secrets.github_token}} + token: ${{secrets.UNRAID_BOT_GITHUB_ADMIN_TOKEN}} prefix: ${{steps.vars.outputs.PACKAGE_LOCK_VERSION}} - name: Build @@ -250,29 +228,16 @@ jobs: - name: Checkout repo uses: actions/checkout@v5 - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - uses: pnpm/action-setup@v4 name: Install pnpm with: run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v4 - name: Setup pnpm cache + - name: Install Node + uses: actions/setup-node@v5 with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + node-version-file: ".nvmrc" + cache: 'pnpm' - name: Cache APT Packages uses: awalsh128/cache-apt-pkgs-action@v1.5.3 @@ -316,29 +281,16 @@ jobs: echo VITE_UNRAID_NET=${{ secrets.VITE_UNRAID_NET }} >> .env echo VITE_CALLBACK_KEY=${{ secrets.VITE_CALLBACK_KEY }} >> .env - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - uses: pnpm/action-setup@v4 name: Install pnpm with: run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v4 - name: Setup pnpm cache + - name: Install Node + uses: actions/setup-node@v5 with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + node-version-file: ".nvmrc" + cache: 'pnpm' - name: PNPM Install run: | diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml index ae37455e2b..9f7d38f73b 100644 --- a/.github/workflows/release-production.yml +++ b/.github/workflows/release-production.yml @@ -28,9 +28,14 @@ jobs: with: latest: true prerelease: false - - uses: actions/setup-node@v4 + - uses: pnpm/action-setup@v4 + name: Install pnpm with: - node-version: '22.18.0' + run_install: false + - uses: actions/setup-node@v5 + with: + node-version-file: ".nvmrc" + cache: 'pnpm' - run: | cat << 'EOF' > release-notes.txt ${{ steps.release-info.outputs.body }}