Fetch Cache #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Cache | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 00 */6 * *" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
target: ['amlogic-meson8b', 'x86-64'] | |
branch: ['24.10', '23.05'] | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: Clone OpenWrt | |
run: | | |
git clone https://github.com/openwrt/openwrt.git | |
- name: Get variable | |
working-directory: ./openwrt | |
id: var | |
run: | | |
case ${{ matrix.branch }} in | |
24.10) | |
_release_tag=$(git tag --sort=taggerdate --list 'v24.*' | tail -1) | |
git checkout $_release_tag | |
;; | |
23.05) | |
_release_tag=$(git tag --sort=taggerdate --list 'v23.*' | tail -1) | |
git checkout $_release_tag | |
;; | |
*) | |
echo "Can't get local/upstream's branch/tags" | |
;; | |
esac | |
- name: Get cache toolchain | |
uses: HiGarfield/cachewrtbuild@main | |
with: | |
prefix: ${{ github.workspace }}/openwrt | |
mixkey: ${{ matrix.target }} | |
skip_saving: 'true' |