mirror of
https://github.com/armbian/actions.git
synced 2026-01-06 10:36:19 -08:00
25 lines
822 B
YAML
25 lines
822 B
YAML
name: "Get latest cache version"
|
|
author: "Igor Pecovnik"
|
|
description: "Get latest cache version"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1
|
|
repository: armbian/cache
|
|
path: cache
|
|
clean: false
|
|
|
|
- name: "Get last release version from cache"
|
|
id: check-released
|
|
shell: bash
|
|
run: |
|
|
|
|
ROOTFSCACHE_VERSION=$(cd cache;gh release list --exclude-drafts | awk '{print $(NF-1)}' | sort -r | head -1)
|
|
[[ -z "$ROOTFSCACHE_VERSION" ]] && ROOTFSCACHE_VERSION="0000"
|
|
ROOTFSCACHE_VERSION=$(expr $ROOTFSCACHE_VERSION + 1)
|
|
ROOTFSCACHE_VERSION=$(printf "%04d\n" ${ROOTFSCACHE_VERSION})
|
|
echo "ROOTFSCACHE_VERSION=${ROOTFSCACHE_VERSION}" >> $GITHUB_ENV
|