mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
push.yml: giving a second chance for cache save/restore actions
This commit is contained in:
34
.github/workflows/push.yml
vendored
34
.github/workflows/push.yml
vendored
@@ -13,6 +13,8 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101"]
|
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101"]
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
|
outputs:
|
||||||
|
current_date: ${{ steps.get_date.outputs.CURRENT_DATE }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
@@ -52,11 +54,17 @@ jobs:
|
|||||||
- name: Generate json index file
|
- name: Generate json index file
|
||||||
run: ./source/metadata.py ${{ matrix.model }}.json
|
run: ./source/metadata.py ${{ matrix.model }}.json
|
||||||
|
|
||||||
- name: Archive ${{ matrix.model }} index file
|
- name: Get date to tag cache with unique key
|
||||||
uses: actions/upload-artifact@v4
|
id: get_date
|
||||||
|
run: |
|
||||||
|
echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S.%N')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache ${{ matrix.model }} index file
|
||||||
|
uses: actions/cache/save@v3
|
||||||
with:
|
with:
|
||||||
name: metadata-${{ matrix.model }}
|
name: metadata-${{ matrix.model }}
|
||||||
path: source/Hexfile/${{ matrix.model }}.json
|
path: source/Hexfile/${{ matrix.model }}.json
|
||||||
|
key: metadata-${{ matrix.model }}-${{ steps.get_date.outputs.CURRENT_DATE }}
|
||||||
|
|
||||||
|
|
||||||
build_multi-lang:
|
build_multi-lang:
|
||||||
@@ -105,11 +113,17 @@ jobs:
|
|||||||
- name: Generate json index file
|
- name: Generate json index file
|
||||||
run: ./source/metadata.py ${{ matrix.model }}_multi-lang.json
|
run: ./source/metadata.py ${{ matrix.model }}_multi-lang.json
|
||||||
|
|
||||||
- name: Archive ${{ matrix.model }} index file
|
- name: Get date to tag cache with unique key
|
||||||
uses: actions/upload-artifact@v4
|
id: get_date
|
||||||
|
run: |
|
||||||
|
echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S.%N')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache ${{ matrix.model }} index file
|
||||||
|
uses: actions/cache/save@v3
|
||||||
with:
|
with:
|
||||||
name: metadata-${{ matrix.model }}_multi-lang
|
name: metadata-${{ matrix.model }}_multi-lang
|
||||||
path: source/Hexfile/${{ matrix.model }}_multi-lang.json
|
path: source/Hexfile/${{ matrix.model }}_multi-lang.json
|
||||||
|
key: metadata-${{ matrix.model }}_multi-lang-${{ steps.get_date.outputs.CURRENT_DATE }}
|
||||||
|
|
||||||
|
|
||||||
upload_metadata:
|
upload_metadata:
|
||||||
@@ -117,15 +131,15 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Download All JSONs
|
- name: Restore cached source
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/cache/restore@v3
|
||||||
with:
|
with:
|
||||||
|
name: metadata-*
|
||||||
path: metadata
|
path: metadata
|
||||||
pattern: metadata-*
|
key: metadata-*-${{ needs.save-files.outputs.current_date }}
|
||||||
merge-multiple: true
|
- run: ls -R ; ls -R metadata
|
||||||
- run: ls -R metadata
|
|
||||||
|
|
||||||
- name: Re-upload JSONs in bulk
|
- name: Upload JSONs in bulk
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: metadata
|
name: metadata
|
||||||
|
|||||||
Reference in New Issue
Block a user