Skip to content

Commit

Permalink
Try and cache apt packages during workflow builds
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed May 14, 2024
1 parent ca4d263 commit d158f9c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/BuildImages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ jobs:
matrix:
config: ${{ fromJson(needs.setup.outputs.matrix) }}
steps:
- name: Cache aptitude
uses: actions/cache@v2
with:
path: repository/src/workspace/aptcache
key: ${{ runner.os }}-apt-get-${{ hashFiles('**/apt.txt') }}
restore-keys: |
${{ runner.os }}-apt-get-
- name: Build image
id: build
uses: mainsail-crew/MainsailOS-actions/build-image@master
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ jobs:
matrix:
config: ${{ fromJson(needs.matrix.outputs.matrix) }}
steps:
- name: Cache aptitude
uses: actions/cache@v2
with:
path: repository/src/workspace/aptcache
key: ${{ runner.os }}-apt-get-${{ hashFiles('**/apt.txt') }}
restore-keys: |
${{ runner.os }}-apt-get-
- name: Build image
id: build
uses: mainsail-crew/MainsailOS-actions/build-image@master
Expand Down
2 changes: 2 additions & 0 deletions config/default
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ BASE_ZIP_IMG="$(get_img_name)"
DIST_NAME="RatOS"
BASE_IMAGE_ENLARGEROOT=6500
BASE_IMAGE_RESIZEROOT=600
BASE_APT_CLEAN=no

# export Variables
export DIST_NAME
Expand All @@ -36,3 +37,4 @@ export BASE_ZIP_IMG
export BASE_IMAGE_ENLARGEROOT
export BASE_IMAGE_RESIZEROOT
export BASE_BOOT_MOUNT_PATH
export BASE_APT_CLEAN
2 changes: 1 addition & 1 deletion config/raspberry/default
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Shebang for better file detection

BASE_IMAGE_ENLARGEROOT=6500
BASE_IMAGE_ENLARGEROOT=10500
BASE_IMAGE_RESIZEROOT=600
# Compress not needed due compression done in workflow
BASE_RELEASE_COMPRESS=no
Expand Down

0 comments on commit d158f9c

Please sign in to comment.