diff --git a/.gitea/workflows/_cache-smoke-test.yml b/.gitea/workflows/_cache-smoke-test.yml index e96bb13..54591b8 100644 --- a/.gitea/workflows/_cache-smoke-test.yml +++ b/.gitea/workflows/_cache-smoke-test.yml @@ -5,36 +5,31 @@ on: branches: [ci-cache-speedup] jobs: - cache-write: + artifact-write: runs-on: ubuntu-latest steps: - - name: Create cache payload + - name: Create artifact payload run: | - mkdir -p /tmp/cache-smoke - echo "hello-${{ github.run_id }}" > /tmp/cache-smoke/data.txt + mkdir -p /tmp/artifact-smoke + echo "hello-${{ github.run_id }}" > /tmp/artifact-smoke/data.txt - - uses: actions/cache@v4 + - uses: actions/upload-artifact@v4 with: - path: /tmp/cache-smoke - key: cache-smoke-${{ github.run_id }} + name: artifact-smoke-${{ github.run_id }} + path: /tmp/artifact-smoke - cache-read: + artifact-read: runs-on: ubuntu-latest - needs: cache-write + needs: artifact-write steps: - - uses: actions/cache@v4 - id: restore + - uses: actions/download-artifact@v4 with: - path: /tmp/cache-smoke - key: cache-smoke-${{ github.run_id }} + name: artifact-smoke-${{ github.run_id }} + path: /tmp/artifact-smoke - - name: Verify cache was restored + - name: Verify artifact was restored run: | - if [ "${{ steps.restore.outputs.cache-hit }}" != "true" ]; then - echo "cache-hit was not true: '${{ steps.restore.outputs.cache-hit }}'" >&2 - exit 1 - fi - test -f /tmp/cache-smoke/data.txt - cat /tmp/cache-smoke/data.txt - test "$(cat /tmp/cache-smoke/data.txt)" = "hello-${{ github.run_id }}" - echo "actions/cache works on this runner" + test -f /tmp/artifact-smoke/data.txt + cat /tmp/artifact-smoke/data.txt + test "$(cat /tmp/artifact-smoke/data.txt)" = "hello-${{ github.run_id }}" + echo "actions/upload-artifact + download-artifact work on this runner"