This commit is contained in:
Alejandro Cabeza Romero 2024-08-22 15:26:09 +02:00
parent 21f5c32145
commit 78ae5f6ce6
No known key found for this signature in database
GPG Key ID: DA3D14AE478030FD
1 changed files with 16 additions and 0 deletions

View File

@ -36,16 +36,32 @@ inputs:
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Fetch tmp cache
uses: actions/cache@v3
id: fetch-tmp-cache
with:
path: /tmp/cache
key: my-tmp-cache
- name: Create tmp cache if not exists
shell: bash
if: steps.fetch-tmp-cache.outputs.cache-hit != 'true'
run: |
mkdir -p /tmp/cache
echo "Hello, World!" > /tmp/cache/hello.txt
- name: Get values - name: Get values
shell: bash shell: bash
run: | run: |
cat /tmp/cache/hello.txt
echo ${{ github.api_url }} echo ${{ github.api_url }}
echo ${{ github.event_name }} echo ${{ github.event_name }}
echo ${{ github.repository }} echo ${{ github.repository }}
echo ${{ github.repositoryUrl }} echo ${{ github.repositoryUrl }}
SECRET=${{ github.token }} SECRET=${{ github.token }}
echo ${SECRET:0:4} echo ${SECRET:0:4}
# https://api.github.com/repos/OWNER/REPO/actions/caches/CACHE_ID
echo ${{ github.api_url }}/repos/${{ github.repository }}/actions/caches
# - name: Restore image from cache # - name: Restore image from cache
# id: deps-cache # id: deps-cache