self hosted runners not used set cache keys
Describe the bug
On self hosted runners it always appears to make a cache key based of the instance it runs on not the cache key set
Version
- [ ] latest
Runners
- [ ] Self Hosted
Operating systems ubuntu 24.04
PHP versions
- 8.3
- 8.4
To Reproduce
name: CI
on:
workflow_call:
workflow_dispatch:
jobs:
php-cs-fixer:
runs-on: self-hosted
env:
extensions: "dom, curl, libxml, mbstring, zip, fileinfo, json, gd, redis, pdo, bcmath"
key: "php-extensions-pint-20250505"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: '8.4'
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Cache Pint
uses: actions/cache@v4
with:
path: ./storage/pint.cache
key: ${{ runner.os }}-pint-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-pint-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: pint
env:
runner: self-hosted
- name: Run Laravel Pint (PHP CS Fixer)
run: pint
continue-on-error: true
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix PHP Syntax Styling
phpstan:
name: phpstan
runs-on: self-hosted
env:
extensions: "dom, curl, libxml, mbstring, zip, fileinfo, json, gd, redis, pdo, bcmath"
key: "php-extensions-phpstan-20250505"
strategy:
fail-fast: true
matrix:
php: [ '8.4' ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
coverage: none
env:
runner: self-hosted
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --ignore-platform-reqs
env:
APP_ENV: testing
- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
name: Application Tests
on:
workflow_call:
workflow_dispatch:
jobs:
laravel_tests:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
php: [ '8.4' ]
# stability: [ prefer-lowest, prefer-stable ]
stability: [ prefer-stable ]
typesense-version: [ '28.0' ]
typesense-port: [ '8108:8108' ]
testsuite: [
'Architecture',
'FeatureAdmin',
'FeatureClient',
'FeatureControllers',
'FeatureInvoice',
'FeatureMilestone',
'FeatureProject',
'FeatureQuote',
'FeatureReport',
'FeatureTicket',
'FeatureTimesheet',
'FeatureUser',
'FeatureWiki',
'FeatureMeta',
'Unit'
]
services:
mysql:
image: mysql:8.1
env:
MYSQL_DATABASE: forge
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:5.0
ports:
- 6379:6379
options: --entrypoint redis-server
typesense:
image: typesense/typesense:${{ matrix.typesense-version }}
ports:
- 8108:8108
env:
TYPESENSE_API_KEY: abcd1234
TYPESENSE_DATA_DIR: /tmp
TYPESENSE_ENABLE_CORS: 1
name: ${{ matrix.testsuite }} - PHP ${{ matrix.php }} - ${{ matrix.stability }} - Typesense ${{ matrix.typesense-version }}
env:
extensions: "dom, curl, libxml, mbstring, zip, fileinfo, json, gd, redis, pdo, bcmath"
key: "php-extensions-tests-20250505"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
coverage: none
env:
runner: self-hosted
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.pipelines', '.env');"
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --ignore-platform-reqs
env:
APP_ENV: testing
- name: Generate env key
run: php artisan key:generate
- name: Test Suite ${{ matrix.testsuite }} Tests
# run: ./vendor/bin/pest --parallel --testsuite ${{ matrix.testsuite }} --colors -c phpunit.xml
run: ./vendor/bin/pest --testsuite ${{ matrix.testsuite }} --colors -c phpunit.xml
env:
DB_HOST: 127.0.0.1
DB_PORT: 33306
DB_DATABASE: forge
DB_USERNAME: root
DB_PASSWORD: secret
REDIS_HOST: 127.0.0.1
TYPESENSE_HOST: 127.0.0.1
TYPESENSE_PORT: 8108
- name: Upload artifacts
uses: actions/upload-artifact@master
if: failure()
with:
name: Logs
path: ./storage/logs
Expected behavior
Cache keys set with the key I think. It load the extensions on new systems from cache not the instance
Screenshots/Logs
Additional context
Are you willing to submit a PR?
Is there any known workaround until that is fixed?
+1
@shivammathur For us this is a big problem, because the usage of self hosted runners is mandatory. Is there any kind of workaround or fix in the pipeline? thx
@jg-development Will look into this.
Just for the record: The current behaviour renders caching totally useless on non-persistant runners (ie runners, that get spawned on demand) because the cache ID will never match anything in the future.
Looking forward to seeing a fix. Let us know if we can help.
@shivammathur Thanks for providing this awesome action
I have tried to fix this for self hosted runners in https://github.com/shivammathur/cache-extensions/commit/c8bb73b31b2eb1adaa4f1f7a92c21cab7fc12dbc.
Please test it with the develop branch using shivammathur/cache-extensions@develop and let me know if it fixes the issue.
@shivammathur : Hope this helps
-
It seems the cache key is generated per job (i.e., one cache key per job). Is this intended behavior?
-
On our self-hosted runners, the zstd extension is missing, while it is present on GitHub-hosted runners. This only became apparent through the debug logs. Maybe it would be helpful to add a check or error message for this case.
-
We created a demo job (php -m). On GitHub-hosted runners, caching works as expected, but not on our self-hosted runner.
On the self-hosted runner, according to the logs, cache entries are created and restored correctly in the "Cache Extensions" step. However, the setup-php step takes just as long as in the first (uncached) run.
Notable differences: Cache entries with -deps are only about 200 bytes on GitHub runners, but around 33 KB on the self-hosted runner. What exactly is stored in these entries?
Log Entries: First run:
Step "Setup cache environment"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node20
/usr/bin/bash /__w/_actions/shivammathur/cache-extensions/develop/src/scripts/cache.sh data imagick, gd, redis, intl, imap, amqp 8.3 cache-extensions-v1
##[debug]Cache service version: v2
##[debug]Resolved Keys:
##[debug]["Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716\n-deps","Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716\n-deps"]
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug][Request] GetCacheEntryDownloadURL https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/GetCacheEntryDownloadURL
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "54",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:33:07 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "C3A3:3663AA:C5CF6F:ED8B53:68CA7243"
##[debug]}
##[debug]Body: {
##[debug] "ok": false,
##[debug] "signed_download_url": "",
##[debug] "matched_key": ""
##[debug]}
##[debug]Cache not found for version 7aa4c7f12b0c1430b3df4de9ef90b8d326436f482137e2eb9bd11a189a797741 of keys: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]-deps, Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]-deps
/usr/bin/bash /__w/_actions/shivammathur/cache-extensions/develop/src/scripts/cache.sh dependencies imagick, gd, redis, intl, imap, amqp 8.3
==> Setup libraries
::group::Logs to set up required libraries
Logs to set up required libraries
✓ libgd3 Added libgd3
✓ libgomp1 Added libgomp1
✓ libicu74 Added libicu74
✓ liblz4-1 Added liblz4-1
✓ libmagickcore-6.q16-7t64 Added libmagickcore-6.q16-7t64
✓ libmagickwand-6.q16-7t64 Added libmagickwand-6.q16-7t64
✓ librabbitmq4 Added librabbitmq4
✓ libstdc++6 Added libstdc++6
✓ libzstd1 Added libzstd1
✓ libavif Added libavif
✓ libheif Added libheif
✓ libraqm Added libraqm
✓ libimagequant Added libimagequant
==> Setup extensions
✓ igbinary Added igbinary
##[debug]Cache service version: v2
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug]implicitDescendants 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/__w/_tool/deps'
##[debug]Matched: ../../_tool/deps
##[debug]Cache Paths:
##[debug]["../../_tool/deps"]
##[debug]Archive Path: /__w/_temp/97f6c491-f442-4e4d-80b5-a7450c0a82c6/cache.tzst
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /__w/deha-importer/deha-importer --files-from manifest.txt --use-compress-program zstdmt
/usr/bin/tar -tf /__w/_temp/97f6c491-f442-4e4d-80b5-a7450c0a82c6/cache.tzst -P --use-compress-program unzstd
../../_tool/deps/
../../_tool/deps/igbinary.so
##[debug]File Size: 34736
##[debug]Reserving Cache
##[debug][Request] CreateCacheEntry https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/CreateCacheEntry
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "436",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:33:22 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "C19F:34356F:C40BF0:EBCEE4:68CA7252"
##[debug]}
::add-mask::***
::add-mask::***
##[debug]Body: {
##[debug] "ok": true,
##[debug] "signed_upload_url": "https://productionresultssa12.blob.core.windows.net/actions-cache/d85-1154522763?se=2025-09-17T09%3A33%3A22Z&sig=***&ske=2025-09-17T17%3A24%3A44Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-09-17T05%3A24%3A44Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-05-05&sp=cw&spr=https&sr=b&st=2025-09-17T08%3A33%3A17Z&sv=2025-05-05",
##[debug] "message": ""
##[debug]}
##[debug]Attempting to upload cache located at: /__w/_temp/97f6c491-f442-4e4d-80b5-a7450c0a82c6/cache.tzst
##[debug]Use Azure SDK: true
##[debug]Upload concurrency: 8
##[debug]Upload chunk size: 67108864
##[debug]BlobClient: d85-1154522763:productionresultssa12:actions-cache
Sent 34736 of 34736 (100.0%), 0.1 MBs/sec
##[debug][Request] FinalizeCacheEntryUpload https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/FinalizeCacheEntryUpload
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "48",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:33:23 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "DF59:36297B:CBCD3C:F37701:68CA7253"
##[debug]}
##[debug]Body: {
##[debug] "ok": true,
##[debug] "entry_id": "1154522763",
##[debug] "message": ""
##[debug]}
##[debug]FinalizeCacheEntryUploadResponse: true
##[debug]Node Action run completed with exit code 0
##[debug]Set output dir = /usr/lib/php/20230831
##[debug]Set output key = Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Finishing: Setup cache environment
Step "Cache Extensions"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node20
##[debug]Cache service version: v2
##[debug]Resolved Keys:
##[debug]["Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716","Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716"]
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug][Request] GetCacheEntryDownloadURL https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/GetCacheEntryDownloadURL
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "54",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:33:24 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "C2C3:20D07E:C02045:E80034:68CA7254"
##[debug]}
##[debug]Body: {
##[debug] "ok": false,
##[debug] "signed_download_url": "",
##[debug] "matched_key": ""
##[debug]}
##[debug]Cache not found for version b2f61ae74aa9c53855b9537f3497f4adafbf661f7c6e6705d81ddec4f606e45e of keys: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716, Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
Cache not found for input keys: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716, Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Node Action run completed with exit code 0
##[debug]Save intra-action state CACHE_KEY = Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Finishing: Cache extensions
Step "Post Cache extension"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node20
##[debug]Cache service version: v2
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug]implicitDescendants 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/usr/lib/php/20230831'
##[debug]Matched: ../../../usr/lib/php/20230831
##[debug]Cache Paths:
##[debug]["../../../usr/lib/php/20230831"]
##[debug]Archive Path: /__w/_temp/348bccbb-d35c-4acd-a3a1-8ccf25368ffa/cache.tzst
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /__w/deha-importer/deha-importer --files-from manifest.txt --use-compress-program zstdmt
/usr/bin/tar -tf /__w/_temp/348bccbb-d35c-4acd-a3a1-8ccf25368ffa/cache.tzst -P --use-compress-program unzstd
../../../usr/lib/php/20230831/
../../../usr/lib/php/20230831/ftp.so
../../../usr/lib/php/20230831/soap.so
../../../usr/lib/php/20230831/deps/
../../../usr/lib/php/20230831/shmop.so
../../../usr/lib/php/20230831/sysvshm.so
../../../usr/lib/php/20230831/sockets.so
../../../usr/lib/php/20230831/xmlwriter.so
../../../usr/lib/php/20230831/calendar.so
../../../usr/lib/php/20230831/redis.so
../../../usr/lib/php/20230831/memcache.so
../../../usr/lib/php/20230831/readline.so
../../../usr/lib/php/20230831/enchant.so
../../../usr/lib/php/20230831/gettext.so
../../../usr/lib/php/20230831/sqlite3.so
../../../usr/lib/php/20230831/mongodb.so
../../../usr/lib/php/20230831/pdo_dblib.so
../../../usr/lib/php/20230831/pdo_pgsql.so
../../../usr/lib/php/20230831/bcmath.so
../../../usr/lib/php/20230831/mysqlnd.so
../../../usr/lib/php/20230831/xmlreader.so
../../../usr/lib/php/20230831/igbinary.so
../../../usr/lib/php/20230831/xml.so
../../../usr/lib/php/20230831/gd.so
../../../usr/lib/php/20230831/pdo_firebird.so
../../../usr/lib/php/20230831/apcu.so
../../../usr/lib/php/20230831/snmp.so
../../../usr/lib/php/20230831/tidy.so
../../../usr/lib/php/20230831/exif.so
../../../usr/lib/php/20230831/amqp.so
../../../usr/lib/php/20230831/dom.so
../../../usr/lib/php/20230831/pdo_sqlite.so
../../../usr/lib/php/20230831/curl.so
../../../usr/lib/php/20230831/xdebug.so
../../../usr/lib/php/20230831/ctype.so
../../../usr/lib/php/20230831/ds.so
##[debug]File Size: 5438409
##[debug]Reserving Cache
##[debug][Request] CreateCacheEntry https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/CreateCacheEntry
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "435",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:35:26 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "F3C8:3EE527:C468A0:EC6DB3:68CA72CD"
##[debug]}
::add-mask::***
::add-mask::***
##[debug]Body: {
##[debug] "ok": true,
##[debug] "signed_upload_url": "https://productionresultssa7.blob.core.windows.net/actions-cache/10e-1154541204?se=2025-09-17T09%3A35%3A26Z&sig=***&ske=2025-09-17T17%3A24%3A30Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-09-17T05%3A24%3A30Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-05-05&sp=cw&spr=https&sr=b&st=2025-09-17T08%3A35%3A21Z&sv=2025-05-05",
##[debug] "message": ""
##[debug]}
##[debug]Attempting to upload cache located at: /__w/_temp/348bccbb-d35c-4acd-a3a1-8ccf25368ffa/cache.tzst
##[debug]Use Azure SDK: true
##[debug]Upload concurrency: 8
##[debug]Upload chunk size: 67108864
##[debug]BlobClient: 10e-1154541204:productionresultssa7:actions-cache
Sent 2031616 of 5438409 (37.4%), 1.9 MBs/sec
Sent 5438409 of 5438409 (100.0%), 3.2 MBs/sec
##[debug][Request] FinalizeCacheEntryUpload https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/FinalizeCacheEntryUpload
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "48",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:35:27 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "F3C8:3EE527:C46EC9:EC74CD:68CA72CE"
##[debug]}
##[debug]Body: {
##[debug] "ok": true,
##[debug] "entry_id": "1154541204",
##[debug] "message": ""
##[debug]}
##[debug]FinalizeCacheEntryUploadResponse: true
Cache saved with key: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Node Action run completed with exit code 0
##[debug]Finishing: Post Cache extensions
Second run:
Step "Setup cache environment"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node20
/usr/bin/bash /__w/_actions/shivammathur/cache-extensions/develop/src/scripts/cache.sh data imagick, gd, redis, intl, imap, amqp 8.3 cache-extensions-v1
##[debug]Cache service version: v2
##[debug]Resolved Keys:
##[debug]["Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716\n-deps","Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716\n-deps"]
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug][Request] GetCacheEntryDownloadURL https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/GetCacheEntryDownloadURL
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "548",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:40:00 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "DE86:2F5985:7B8305:8CEAEF:68CA73E0"
##[debug]}
::add-mask::***
::add-mask::***
##[debug]Body: {
##[debug] "ok": true,
##[debug] "signed_download_url": "https://productionresultssa12.blob.core.windows.net/actions-cache/d85-1154522763?se=2025-09-17T08%3A50%3A00Z&sig=***&ske=2025-09-17T17%3A24%3A31Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-09-17T05%3A24%3A31Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-05-05&sp=r&spr=https&sr=b&st=2025-09-17T08%3A39%3A55Z&sv=2025-05-05",
##[debug] "matched_key": "Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716\n-deps"
##[debug]}
Cache hit for: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
-deps
##[debug]Archive path: /__w/_temp/7f141288-8614-4ec4-a2f6-1000f238871d/cache.tzst
##[debug]Starting download of archive to: /__w/_temp/7f141288-8614-4ec4-a2f6-1000f238871d/cache.tzst
##[debug]Use Azure SDK: true
##[debug]Download concurrency: 8
##[debug]Request timeout (ms): 30000
##[debug]Cache segment download timeout mins env var: undefined
##[debug]Segment download timeout (ms): 600000
##[debug]Lookup only: false
##[debug]Downloading segment at offset 0 with length 34736...
Received 34736 of 34736 (100.0%), 0.2 MBs/sec
Cache Size: ~0 MB (34736 B)
/usr/bin/tar -tf /__w/_temp/7f141288-8614-4ec4-a2f6-1000f238871d/cache.tzst -P --use-compress-program unzstd
../../_tool/deps/
../../_tool/deps/igbinary.so
/usr/bin/tar -xf /__w/_temp/7f141288-8614-4ec4-a2f6-1000f238871d/cache.tzst -P -C /__w/deha-importer/deha-importer --use-compress-program unzstd
Cache restored successfully
/usr/bin/bash /__w/_actions/shivammathur/cache-extensions/develop/src/scripts/cache.sh dependencies imagick, gd, redis, intl, imap, amqp 8.3
==> Setup libraries
::group::Logs to set up required libraries
Logs to set up required libraries
✓ libc-client2007e Added libc-client2007e
✓ libc6 Added libc6
✓ libgcc-s1 Added libgcc-s1
✓ libgd3 Added libgd3
✓ libgomp1 Added libgomp1
✓ libicu74 Added libicu74
✓ liblz4-1 Added liblz4-1
✓ libmagickcore-6.q16-7t64 Added libmagickcore-6.q16-7t64
✓ libmagickwand-6.q16-7t64 Added libmagickwand-6.q16-7t64
✓ librabbitmq4 Added librabbitmq4
✓ libstdc++6 Added libstdc++6
✓ libzstd1 Added libzstd1
✓ libavif Added libavif
✓ libheif Added libheif
✓ libraqm Added libraqm
✓ libimagequant Added libimagequant
==> Setup extensions
✓ igbinary Added igbinary
##[debug]Node Action run completed with exit code 0
##[debug]Set output dir = /usr/lib/php/20230831
##[debug]Set output key = Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Finishing: Setup cache environment
Step "Cache Extensions"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node20
##[debug]Cache service version: v2
##[debug]Resolved Keys:
##[debug]["Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716","Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716"]
##[debug]Checking zstd --quiet --version
##[debug]1.5.5
##[debug]zstd version: 1.5.5
##[debug][Request] GetCacheEntryDownloadURL https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/GetCacheEntryDownloadURL
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "536",
##[debug] "content-type": "application/json",
##[debug] "date": "Wed, 17 Sep 2025 08:40:20 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "E5DE:376422:6E517F:800216:68CA73F4"
##[debug]}
::add-mask::***
::add-mask::***
##[debug]Body: {
##[debug] "ok": true,
##[debug] "signed_download_url": "https://productionresultssa7.blob.core.windows.net/actions-cache/10e-1154541204?se=2025-09-17T08%3A50%3A20Z&sig=***&ske=2025-09-17T17%3A24%3A48Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-09-17T05%3A24%3A48Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-05-05&sp=r&spr=https&sr=b&st=2025-09-17T08%3A40%3A15Z&sv=2025-05-05",
##[debug] "matched_key": "Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716"
##[debug]}
Cache hit for: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
../../../usr/lib/php/20230831/build/run-tests.php
../../../usr/lib/php/20230831/build/shtool
../../../usr/lib/php/20230831/build/ax_check_compile_flag.m4
../../../usr/lib/php/20230831/build/config.guess
../../../usr/lib/php/20230831/build/libtool.m4
../../../usr/lib/php/20230831/build/pkg.m4
../../../usr/lib/php/20230831/build/ax_gcc_func_attribute.m4
../../../usr/lib/php/20230831/build/ltmain.sh
../../../usr/lib/php/20230831/build/php.m4
../../../usr/lib/php/20230831/build/phpize.m4
../../../usr/lib/php/20230831/mysqli.so
../../../usr/lib/php/20230831/posix.so
../../../usr/lib/php/20230831/iconv.so
../../../usr/lib/php/20230831/mbstring.so
../../../usr/lib/php/20230831/memcached.so
../../../usr/lib/php/20230831/sysvmsg.so
../../../usr/lib/php/20230831/pgsql.so
../../../usr/lib/php/20230831/sysvsem.so
../../../usr/lib/php/20230831/dba.so
../../../usr/lib/php/20230831/pdo_sqlsrv.so
../../../usr/lib/php/20230831/pdo_odbc.so
../../../usr/lib/php/20230831/imagick.so
../../../usr/lib/php/20230831/fileinfo.so
../../../usr/lib/php/20230831/ast.so
../../../usr/lib/php/20230831/pdo_mysql.so
../../../usr/lib/php/20230831/intl.so
../../../usr/lib/php/20230831/simplexml.so
../../../usr/lib/php/20230831/odbc.so
../../../usr/lib/php/20230831/pspell.so
../../../usr/lib/php/20230831/bz2.so
../../../usr/lib/php/20230831/opcache.so
../../../usr/lib/php/20230831/phar.so
../../../usr/lib/php/20230831/ffi.so
../../../usr/lib/php/20230831/tokenizer.so
../../../usr/lib/php/20230831/zip.so
../../../usr/lib/php/20230831/sqlsrv.so
../../../usr/lib/php/20230831/ldap.so
../../../usr/lib/php/20230831/pdo_firebird.so
../../../usr/lib/php/20230831/apcu.so
../../../usr/lib/php/20230831/snmp.so
../../../usr/lib/php/20230831/tidy.so
../../../usr/lib/php/20230831/exif.so
../../../usr/lib/php/20230831/amqp.so
../../../usr/lib/php/20230831/dom.so
../../../usr/lib/php/20230831/pdo_sqlite.so
../../../usr/lib/php/20230831/curl.so
../../../usr/lib/php/20230831/xdebug.so
../../../usr/lib/php/20230831/ctype.so
../../../usr/lib/php/20230831/ds.so
/usr/bin/tar -xf /__w/_temp/f6640780-5d92-4dfd-aa2d-236822277eed/cache.tzst -P -C /__w/deha-importer/deha-importer --use-compress-program unzstd
Cache restored successfully
Cache restored from key: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Node Action run completed with exit code 0
##[debug]Save intra-action state CACHE_KEY = Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Save intra-action state CACHE_RESULT = Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
##[debug]Set output cache-hit = true
##[debug]Finishing: Cache extensions
Step "Post Cache extension"
##[debug]Evaluating condition for step: 'Post Cache extensions'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Post Cache extensions
##[debug]Loading inputs
##[debug]Evaluating: steps.extcache.outputs.dir
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'extcache'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'dir'
##[debug]=> '/usr/lib/php/20230831'
##[debug]Result: '/usr/lib/php/20230831'
##[debug]Evaluating: steps.extcache.outputs.key
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'extcache'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'key'
##[debug]=> 'Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716'
##[debug]Result: 'Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716'
##[debug]Evaluating: steps.extcache.outputs.key
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'extcache'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'key'
##[debug]=> 'Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716'
##[debug]Result: 'Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716'
##[debug]Loading env
Post job cleanup.
/usr/bin/docker exec ab48b749d161cf2cfc76028d4b8fb911da236560259bfc1dd3ea6499d1ef3f33 sh -c "cat /etc/*release | grep ^ID"
##[debug]ID=ubuntu
##[debug]ID_LIKE=debian
##[debug]Running JavaScript Action with default external tool: node20
##[debug]Cache state/key: Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716
Cache hit occurred on the primary key Linux-noble-x86_64-8.3-aa6d49354eab051de767249717523062040db1f458304bebfb49a78babb0e9a1-20240716, not saving cache.
##[debug]Node Action run completed with exit code 0
##[debug]Finishing: Post Cache extensions
name: PHP Cache
on:
push:
branches:
- '**'
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
permissions:
contents: read
jobs:
php-cache:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: "xxx"
container:
image: xxx/ubuntu:latest
credentials:
username: xxx
password: xxx
strategy:
matrix:
php:
- "8.3"
include:
- composer-options: "--no-scripts"
env:
extensions: imagick, gd, redis, intl, imap, amqp
key: cache-extensions-v1
ACTIONS_STEP_DEBUG: true
ACTIONS_RUNNER_DEBUG: true
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Install zstd"
run: apt-get update && apt-get install -y zstd
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@develop
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: "prepare php version"
uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
coverage: xdebug
- name: "php extensions"
run: php -m
I can provide you with the full download of the log files, if you need them as well.
@jg-development Can you run the setup-php step with the verbose tag shivammathur/setup-php@verbose and provide me the logs for that step. It might not be the extensions that are slowing down the setup-php step in your case.
@shivammathur yes, we figured this out an hour ago. seems related: https://github.com/shivammathur/setup-php/issues/922
we are trying to use an own image for testing. will keep u informed.
only these 2 questions remain: It seems the cache key is generated per job (i.e., one cache key per job). Is this intended behavior?
On our self-hosted runners, the zstd extension is missing, while it is present on GitHub-hosted runners. This only became apparent through the debug logs. Maybe it would be helpful to add a check or error message for this case.
@jg-development After https://github.com/shivammathur/cache-extensions/commit/c8bb73b31b2eb1adaa4f1f7a92c21cab7fc12dbc is merged, the cache key for self-hosted runners should not depend on the job, only the inputs and the workflow.
For the self-hosted runners, it installs a very minimal set of extensions. If you have zstd in the extensions list and it is cached then it should be fast.
@shivammathur I was trying to test the caching with other self-hosted runners and have now this problem:
Setup cache environment:
2025-11-20T12:00:28.7341181Z [command]/usr/bin/bash /run/act/actions/606bc83e8dd56df692594a092f52b9c2a13df927e70b6bc854c045175abb820e/src/scripts/cache.sh data ctype, curl, date, dom, filter, hash, intl, json, mbstring, ***izer, xml, xmlwriter, zip 8.4 cache-v1
2025-11-20T12:00:30.5369698Z Cache Size: ~0 MB (200 B)
2025-11-20T12:00:30.5447018Z [command]/usr/bin/tar -xf /tmp/1a842acf-f23d-418a-bf8b-f7ef0113baf6/cache.tzst -P -C /workspace/xxx --use-compress-program unzstd
2025-11-20T12:00:30.5565142Z /usr/bin/tar: ../../../opt/hostedtoolcache/deps: Cannot utime: Operation not permitted
2025-11-20T12:00:30.5565854Z /usr/bin/tar: Exiting with failure status due to previous errors
2025-11-20T12:00:30.5566457Z ::warning::Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
2025-11-20T12:00:30.5595982Z [command]/usr/bin/bash /run/act/actions/606bc83e8dd56df692594a092f52b9c2a13df927e70b6bc854c045175abb820e/src/scripts/cache.sh dependencies ctype, curl, date, dom, filter, hash, intl, json, mbstring, ***izer, xml, xmlwriter, zip 8.4
2025-11-20T12:00:31.6542448Z
Cache extensions
2025-11-20T12:00:53.6920664Z [command]/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /workspace/xxx --files-from manifest.txt --use-compress-program zstdmt
2025-11-20T12:00:53.7445835Z Cache Size: ~0 MB (200 B)
2025-11-20T12:00:53.7722824Z Cache saved successfully
2025-11-20T12:00:55.3668346Z Cache Size: ~6 MB (6217167 B)
2025-11-20T12:00:55.3675301Z [command]/usr/bin/tar -xf /tmp/bb5a3b64-103c-41ee-b41d-336d9a8f4e7d/cache.tzst -P -C /workspace/xxx --use-compress-program unzstd
2025-11-20T12:00:55.3705209Z /usr/bin/tar: ../../../usr/lib/php/20240924/ctype.so: Cannot open: Permission denied
2025-11-20T12:00:55.3706745Z /usr/bin/tar: ../../../usr/lib/php/20240924/odbc.so: Cannot open: Permission denied
2025-11-20T12:00:55.3707112Z /usr/bin/tar: ../../../usr/lib/php/20240924/iconv.so: Cannot open: Permission denied
2025-11-20T12:00:55.3707514Z /usr/bin/tar: ../../../usr/lib/php/20240924/apcu.so: Cannot open: Permission denied
2025-11-20T12:00:55.3707729Z /usr/bin/tar: ../../../usr/lib/php/20240924/exif.so: Cannot open: Permission denied
2025-11-20T12:00:55.3710590Z /usr/bin/tar: ../../../usr/lib/php/20240924/simplexml.so: Cannot open: Permission denied
2025-11-20T12:00:55.3710986Z /usr/bin/tar: ../../../usr/lib/php/20240924/zmq.so: Cannot open: Permission denied
2025-11-20T12:00:55.3711238Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_mysql.so: Cannot open: Permission denied
2025-11-20T12:00:55.3711448Z /usr/bin/tar: ../../../usr/lib/php/20240924/xmlwriter.so: Cannot open: Permission denied
2025-11-20T12:00:55.3711656Z /usr/bin/tar: ../../../usr/lib/php/20240924/enchant.so: Cannot open: Permission denied
2025-11-20T12:00:55.3749684Z /usr/bin/tar: ../../../usr/lib/php/20240924/ffi.so: Cannot open: Permission denied
2025-11-20T12:00:55.3750140Z /usr/bin/tar: ../../../usr/lib/php/20240924/intl.so: Cannot open: Permission denied
2025-11-20T12:00:55.3750367Z /usr/bin/tar: ../../../usr/lib/php/20240924/ldap.so: Cannot open: Permission denied
2025-11-20T12:00:55.3785026Z /usr/bin/tar: ../../../usr/lib/php/20240924/dom.so: Cannot open: Permission denied
2025-11-20T12:00:55.3797605Z /usr/bin/tar: ../../../usr/lib/php/20240924/bcmath.so: Cannot open: Permission denied
2025-11-20T12:00:55.3804590Z /usr/bin/tar: ../../../usr/lib/php/20240924/ftp.so: Cannot open: Permission denied
2025-11-20T12:00:55.3804941Z /usr/bin/tar: ../../../usr/lib/php/20240924/xml.so: Cannot open: Permission denied
2025-11-20T12:00:55.3805633Z /usr/bin/tar: ../../../usr/lib/php/20240924/sysvsem.so: Cannot open: Permission denied
2025-11-20T12:00:55.3805882Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_firebird.so: Cannot open: Permission denied
2025-11-20T12:00:55.3808604Z /usr/bin/tar: ../../../usr/lib/php/20240924/mysqlnd.so: Cannot open: Permission denied
2025-11-20T12:00:55.3809462Z /usr/bin/tar: ../../../usr/lib/php/20240924/memcache.so: Cannot open: Permission denied
2025-11-20T12:00:55.3825852Z /usr/bin/tar: ../../../usr/lib/php/20240924/ds.so: Cannot open: Permission denied
2025-11-20T12:00:55.3826224Z /usr/bin/tar: ../../../usr/lib/php/20240924/imap.so: Cannot open: Permission denied
2025-11-20T12:00:55.3828948Z /usr/bin/tar: ../../../usr/lib/php/20240924/gd.so: Cannot open: Permission denied
2025-11-20T12:00:55.3829266Z /usr/bin/tar: ../../../usr/lib/php/20240924/bz2.so: Cannot open: Permission denied
2025-11-20T12:00:55.3831075Z /usr/bin/tar: ../../../usr/lib/php/20240924/soap.so: Cannot open: Permission denied
2025-11-20T12:00:55.3839411Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_dblib.so: Cannot open: Permission denied
2025-11-20T12:00:55.3882293Z /usr/bin/tar: ../../../usr/lib/php/20240924/mbstring.so: Cannot open: Permission denied
2025-11-20T12:00:55.3882678Z /usr/bin/tar: ../../../usr/lib/php/20240924/snmp.so: Cannot open: Permission denied
2025-11-20T12:00:55.3885341Z /usr/bin/tar: ../../../usr/lib/php/20240924/gettext.so: Cannot open: Permission denied
2025-11-20T12:00:55.3885635Z /usr/bin/tar: ../../../usr/lib/php/20240924/dba.so: Cannot open: Permission denied
2025-11-20T12:00:55.3887472Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_sqlite.so: Cannot open: Permission denied
2025-11-20T12:00:55.3896774Z /usr/bin/tar: ../../../usr/lib/php/20240924/sqlsrv.so: Cannot open: Permission denied
2025-11-20T12:00:55.3897158Z /usr/bin/tar: ../../../usr/lib/php/20240924/memcached.so: Cannot open: Permission denied
2025-11-20T12:00:55.3897434Z /usr/bin/tar: ../../../usr/lib/php/20240924/deps: Cannot utime: Operation not permitted
2025-11-20T12:00:55.3897672Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_pgsql.so: Cannot open: Permission denied
2025-11-20T12:00:55.3897908Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo.so: Cannot open: Permission denied
2025-11-20T12:00:55.3907526Z /usr/bin/tar: ../../../usr/lib/php/20240924/redis.so: Cannot open: Permission denied
2025-11-20T12:00:55.3908233Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3942054Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3942435Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/Makefile.global: Cannot open: No such file or directory
2025-11-20T12:00:55.3942663Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3942850Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/pkg.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3943052Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3943218Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/gen_stub.php: Cannot open: No such file or directory
2025-11-20T12:00:55.3943391Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3943551Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/config.sub: Cannot open: No such file or directory
2025-11-20T12:00:55.3955107Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3958005Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/php_cxx_compile_stdcxx.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3959392Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3963290Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/phpize.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3963575Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3970862Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/ax_gcc_func_attribute.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3971320Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3971568Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/shtool: Cannot open: No such file or directory
2025-11-20T12:00:55.3971772Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3972158Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/config.guess: Cannot open: No such file or directory
2025-11-20T12:00:55.3972406Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3972757Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/php.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3973027Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3973225Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/ax_check_compile_flag.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3973427Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3973680Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/run-tests.php: Cannot open: No such file or directory
2025-11-20T12:00:55.3973906Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3985020Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/ltmain.sh: Cannot open: No such file or directory
2025-11-20T12:00:55.3985342Z /usr/bin/tar: ../../../usr/lib/php/20240924/build: Cannot mkdir: Permission denied
2025-11-20T12:00:55.3990860Z /usr/bin/tar: ../../../usr/lib/php/20240924/build/libtool.m4: Cannot open: No such file or directory
2025-11-20T12:00:55.3991681Z /usr/bin/tar: ../../../usr/lib/php/20240924/opcache.so: Cannot open: Permission denied
2025-11-20T12:00:55.3992242Z /usr/bin/tar: ../../../usr/lib/php/20240924/phar.so: Cannot open: Permission denied
2025-11-20T12:00:55.4045939Z /usr/bin/tar: ../../../usr/lib/php/20240924/fileinfo.so: Cannot open: Permission denied
2025-11-20T12:00:55.4046555Z /usr/bin/tar: ../../../usr/lib/php/20240924/sqlite3.so: Cannot open: Permission denied
2025-11-20T12:00:55.4046847Z /usr/bin/tar: ../../../usr/lib/php/20240924/ast.so: Cannot open: Permission denied
2025-11-20T12:00:55.4047069Z /usr/bin/tar: ../../../usr/lib/php/20240924/yaml.so: Cannot open: Permission denied
2025-11-20T12:00:55.4047323Z /usr/bin/tar: ../../../usr/lib/php/20240924/***izer.so: Cannot open: Permission denied
2025-11-20T12:00:55.4049874Z /usr/bin/tar: ../../../usr/lib/php/20240924/pcov.so: Cannot open: Permission denied
2025-11-20T12:00:55.4051594Z /usr/bin/tar: ../../../usr/lib/php/20240924/xsl.so: Cannot open: Permission denied
2025-11-20T12:00:55.4055104Z /usr/bin/tar: ../../../usr/lib/php/20240924/pgsql.so: Cannot open: Permission denied
2025-11-20T12:00:55.4056312Z /usr/bin/tar: ../../../usr/lib/php/20240924/calendar.so: Cannot open: Permission denied
2025-11-20T12:00:55.4058000Z /usr/bin/tar: ../../../usr/lib/php/20240924/readline.so: Cannot open: Permission denied
2025-11-20T12:00:55.4058442Z /usr/bin/tar: ../../../usr/lib/php/20240924/posix.so: Cannot open: Permission denied
2025-11-20T12:00:55.4059181Z /usr/bin/tar: ../../../usr/lib/php/20240924/igbinary.so: Cannot open: Permission denied
2025-11-20T12:00:55.4059530Z /usr/bin/tar: ../../../usr/lib/php/20240924/amqp.so: Cannot open: Permission denied
2025-11-20T12:00:55.4063588Z /usr/bin/tar: ../../../usr/lib/php/20240924/zip.so: Cannot open: Permission denied
2025-11-20T12:00:55.4074496Z /usr/bin/tar: ../../../usr/lib/php/20240924/xdebug.so: Cannot open: Permission denied
2025-11-20T12:00:55.4077413Z /usr/bin/tar: ../../../usr/lib/php/20240924/sockets.so: Cannot open: Permission denied
2025-11-20T12:00:55.4093609Z /usr/bin/tar: ../../../usr/lib/php/20240924/imagick.so: Cannot open: Permission denied
2025-11-20T12:00:55.4093929Z /usr/bin/tar: ../../../usr/lib/php/20240924/sysvshm.so: Cannot open: Permission denied
2025-11-20T12:00:55.4099229Z /usr/bin/tar: ../../../usr/lib/php/20240924/xmlreader.so: Cannot open: Permission denied
2025-11-20T12:00:55.4102705Z /usr/bin/tar: ../../../usr/lib/php/20240924/curl.so: Cannot open: Permission denied
2025-11-20T12:00:55.4103352Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_sqlsrv.so: Cannot open: Permission denied
2025-11-20T12:00:55.4103595Z /usr/bin/tar: ../../../usr/lib/php/20240924/msgpack.so: Cannot open: Permission denied
2025-11-20T12:00:55.4103785Z /usr/bin/tar: ../../../usr/lib/php/20240924/pdo_odbc.so: Cannot open: Permission denied
2025-11-20T12:00:55.4104394Z /usr/bin/tar: ../../../usr/lib/php/20240924/mysqli.so: Cannot open: Permission denied
2025-11-20T12:00:55.4104685Z /usr/bin/tar: ../../../usr/lib/php/20240924/shmop.so: Cannot open: Permission denied
2025-11-20T12:00:55.4161745Z /usr/bin/tar: ../../../usr/lib/php/20240924/mongodb.so: Cannot open: Permission denied
2025-11-20T12:00:55.4165864Z /usr/bin/tar: ../../../usr/lib/php/20240924/gmp.so: Cannot open: Permission denied
2025-11-20T12:00:55.4166437Z /usr/bin/tar: ../../../usr/lib/php/20240924/sysvmsg.so: Cannot open: Permission denied
2025-11-20T12:00:55.4166683Z /usr/bin/tar: ../../../usr/lib/php/20240924/tidy.so: Cannot open: Permission denied
2025-11-20T12:00:55.4178096Z /usr/bin/tar: ../../../usr/lib/php/20240924: Cannot utime: Operation not permitted
2025-11-20T12:00:55.4178455Z /usr/bin/tar: Exiting with failure status due to previous errors
2025-11-20T12:00:55.4186422Z ::warning::Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
2025-11-20T12:00:55.4272118Z Cache not found for input keys: Linux-noble-x86_64-8.4-b5f548bad1a4517bf88ed23776571c401a34b3f4d505def7f5d5b3d8d5803652-20240716, Linux-noble-x86_64-8.4-b5f548bad1a4517bf88ed23776571c401a34b3f4d505def7f5d5b3d8d5803652-20240716
2025-11-20T12:00:56.5199379Z [command]/usr/bin/bash /run/act/actions/e270a6993a3ed398cba1614a3d4513ec38fd8e1b0a0142075d47c435a87f174b/src/scripts/run.sh
as far as I remember, the only option to fix this is by extending the image with morge rights for the user. or is it possible to add a parameter, that die tar commands are implemented with a sudo? for that, we only need to add the runner user to the sudo group
maybe related: https://github.com/shivammathur/cache-extensions/issues/27
@shivammathur we fixed the problem regarding the self-hosted runner via a step:
- name: root suid tar
run: sudo chown root /bin/tar && sudo chmod u+s /bin/tar
maybe, this should be updated in the docu?
the problem with the slow setup-php was optimized with caching apt packages:
- name: cache php apt dev packages
uses: tecolicom/actions-use-apt-tools@v1
id: apt-install-dev
with:
tools: libc6 libcurl4t64 libgcc-s1 libicu74 libonig5 libstdc++6 libxml2 libxmlrpc-epi0t64 libxslt1.1 libzip4t64 apt-transport-https ca-certificates curl file make jq unzip autoconf automake gcc g++ gnupg autoconf firebird-dev freetds-dev libacl1-dev libapparmor-dev libargon2-dev libaspell-dev libc-client2007e-dev libcurl4-openssl-dev libdb-dev libedit-dev libenchant-2-dev libraqm-dev libimagequant-dev libgd-dev libgomp1 libicu-dev libjpeg-dev libkrb5-dev libldap-dev liblmdb-dev liblz4-dev libmagickwand-dev libmemcached-dev libonig-dev libpcre2-dev libpng-dev libpq-dev libqdbm-dev librabbitmq-dev libsnmp-dev libsodium-dev libsqlite3-dev libtidy-dev libtool libwebp-dev libwrap0-dev libxpm-dev libxml2-dev libxmlrpc-epi-dev libxslt1-dev libyaml-dev libzip-dev libzmq3-dev libzstd-dev make php-common shtool snmp systemd tzdata unixodbc-dev
- name: cache php apt packages
uses: tecolicom/actions-use-apt-tools@v1
id: apt-install
with:
repos: ppa:ondrej/php
tools: php8.4 php8.4-cli php8.4-curl php8.4-intl php8.4-mbstring php8.4-xml php8.4-zip
method: package
this is an example for a php8.4 ...... I do not have an information for all the packages. @shivammathur Is it possible to integrate this kind of caching into the cache-extension/setup-php as well? would be awesome for self-hosted runners.