Cache Packwiz binary

This commit is contained in:
Technocality
2025-07-21 15:14:51 -05:00
parent 0469c72909
commit 6d8c0966ab
4 changed files with 77 additions and 1 deletions

View File

@@ -19,16 +19,34 @@ jobs:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 1
# Cache Packwiz binary to avoid Go setup and compilation
- name: Cache Packwiz Binary
uses: actions/cache@v4
id: cache-packwiz
with:
path: ~/go/bin/packwiz
key: packwiz-binary-${{ runner.os }}-v1
restore-keys: |
packwiz-binary-${{ runner.os }}-
# Only set up Go and install Packwiz if not cached
- name: Set up Go
if: steps.cache-packwiz.outputs.cache-hit != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
if: steps.cache-packwiz.outputs.cache-hit != 'true'
run: go install github.com/packwiz/packwiz@latest
# Add Packwiz to PATH (whether cached or freshly installed)
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Update ${{ matrix.modpack }} - ${{ matrix.platform }} - ${{ matrix.loader }} - ${{ matrix.minecraft }}
run: |
DIR="./versions/vanilla/src/${{ matrix.modpack }}/${{ matrix.platform }}/${{ matrix.loader }}/${{ matrix.minecraft }}"
@@ -46,11 +64,12 @@ jobs:
commit-changes:
needs: update-modpacks
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 1
- name: Pull latest changes
run: git pull origin main

View File

@@ -155,16 +155,35 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
# Cache Packwiz binary to avoid Go setup and compilation
- name: Cache Packwiz Binary
uses: actions/cache@v4
id: cache-packwiz
with:
path: ~/go/bin/packwiz
key: packwiz-binary-${{ runner.os }}-v1
restore-keys: |
packwiz-binary-${{ runner.os }}-
# Only set up Go and install Packwiz if not cached
- name: Set up Go
if: steps.cache-packwiz.outputs.cache-hit != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
if: steps.cache-packwiz.outputs.cache-hit != 'true'
run: go install github.com/packwiz/packwiz@latest
# Add Packwiz to PATH (whether cached or freshly installed)
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Set version and commit SHA
id: version
run: |

View File

@@ -79,16 +79,35 @@ jobs:
OUTPUT: artifacts
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Cache Packwiz binary to avoid Go setup and compilation
- name: Cache Packwiz Binary
uses: actions/cache@v4
id: cache-packwiz
with:
path: ~/go/bin/packwiz
key: packwiz-binary-${{ runner.os }}-v1
restore-keys: |
packwiz-binary-${{ runner.os }}-
# Only set up Go and install Packwiz if not cached
- name: Set up Go
if: steps.cache-packwiz.outputs.cache-hit != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
if: steps.cache-packwiz.outputs.cache-hit != 'true'
run: go install github.com/packwiz/packwiz@latest
# Add Packwiz to PATH (whether cached or freshly installed)
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Create short commit SHA
id: vars
run: |

View File

@@ -79,16 +79,35 @@ jobs:
OUTPUT: artifacts
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
# Cache Packwiz binary to avoid Go setup and compilation
- name: Cache Packwiz Binary
uses: actions/cache@v4
id: cache-packwiz
with:
path: ~/go/bin/packwiz
key: packwiz-binary-${{ runner.os }}-v1
restore-keys: |
packwiz-binary-${{ runner.os }}-
# Only set up Go and install Packwiz if not cached
- name: Set up Go
if: steps.cache-packwiz.outputs.cache-hit != 'true'
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Install Packwiz
if: steps.cache-packwiz.outputs.cache-hit != 'true'
run: go install github.com/packwiz/packwiz@latest
# Add Packwiz to PATH (whether cached or freshly installed)
- name: Add Packwiz to PATH
run: echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Create short commit SHA
id: vars
run: |