Skip to content

test cache

test cache #1

Workflow file for this run

name: 'Cache test'
on:
push: {}
workflow_dispatch: {}
jobs:
check-env:
permissions:
contents: none
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
check-docker: ${{ steps.check-docker.outputs.defined }}
steps:
- id: check-docker
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
if: ${{ env.DOCKER_USERNAME != '' }}
run: echo "defined=true" >> $GITHUB_OUTPUT
release:
runs-on: ubuntu-latest
needs: check-env
if: needs.check-env.outputs.check-docker == 'true'
timeout-minutes: 120
permissions:
packages: write
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate random cache
run: |
dd if=/dev/urandom of=randomfile bs=1M count=1
- name: Save cache
uses: actions/cache@v4
with:
path: randomfile
key: ${{ runner.os }}-${{ hashFiles('randomfile') }}