Skip to content

Commit b022364

Browse files
committed
build: cache build key Fixup 101
Signed-off-by: Eliminater74 <eliminater74@gmail.com>
1 parent 82c3dc3 commit b022364

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/build-openwrt.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,17 @@ jobs:
384384
- name: Cache Key Get/Check
385385
working-directory: '/workdir/openwrt'
386386
run: |
387-
cd "$GITHUB_WORKSPACE"/openwrt
388-
chmod +x "$GITHUB_WORKSPACE"/scripts/$FUNCTIONS_SH
389-
source "$GITHUB_WORKSPACE"/scripts/$FUNCTIONS_SH
390-
CACHE_DEPENDENCY
387+
export cache_toolchain=$(git log --pretty=tformat:"%h" -n1 tools toolchain)
388+
export cache_feeds=$(git log --pretty=tformat:"%h" -n1 feeds)
389+
export cache_package=$(git log --pretty=tformat:"%h" -n1 package)
390+
export cache_target=$(git log --pretty=tformat:"%h" -n1 target)
391+
export cache_staging_dir=$(git log --pretty=tformat:"%h" -n1 staging_dir)
392+
393+
echo "cache_toolchain=$cache_toolchain" >>"$GITHUB_ENV"
394+
echo "cache_feeds=$cache_feeds" >>"$GITHUB_ENV"
395+
echo "cache_package=$cache_package" >>"$GITHUB_ENV"
396+
echo "cache_target=$cache_target" >>"$GITHUB_ENV"
397+
echo "cache_staging_dir=$cache_staging_dir" >>"$GITHUB_ENV"
391398
### ----------------------------------------------------------------- ###
392399
- name: Cache Acceleration (Secondary compilation of the same model with the same source code is valid within 7 days, and only one source code cache is retained each time)
393400
uses: DevOpenWRT-Router/Cache-OpenWRT-Builds@main

0 commit comments

Comments
 (0)