Skip to content

Tune

Tune #8

Workflow file for this run

name: Tune
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
tune:
name: Tune
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Get cache
id: cache
run: |
cache=$(curl -s https://api.github.com/repos/StronzLabs/Stronzflix/properties/values | jq -r '.[] | select(.property_name == "Cache") | .value' | base64 -d | sed 's/|/ /g')
echo "cache=$cache" >> "$GITHUB_OUTPUT"
- name: Tune
id: tune
run: |
echo ${{ steps.cache.outputs.cache }}
echo "cache=Lg==" >> "$GITHUB_OUTPUT"
- name: Set cache
run: |
curl -s -X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PERSONAL_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H 'content-type: application/json' \
https://api.github.com/repos/StronzLabs/Stronzflix/properties/values \
-d "{\"properties":[{\"property_name\":\"Cache\",\"value\":\"${{ steps.tune.outputs.cache }}\"}]}"