download-cache.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: archive download sources weekly
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: "* 14 * * 5"
  6. env:
  7. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  8. jobs:
  9. download:
  10. name: cache download sources
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. php-version: [ "8.0", "8.1", "8.2" ]
  15. steps:
  16. - uses: actions/checkout@v3
  17. # Cache composer dependencies
  18. - id: cache-composer-deps
  19. uses: actions/cache@v3
  20. with:
  21. path: vendor
  22. key: composer-dependencies
  23. # If there's no Composer cache, install dependencies
  24. - if: steps.cache-composer-deps.outputs.cache-hit != 'true'
  25. run: composer update --no-dev
  26. # If there's no dependencies cache, fetch sources, with or without debug
  27. - if: steps.cache-download.outputs.cache-hit != 'true'
  28. run: ./bin/spc download --with-php=${{ matrix.php-version }} --all --debug
  29. # Upload downloaded files
  30. - uses: actions/upload-artifact@v3
  31. with:
  32. name: download-files-${{ matrix.php-version }}
  33. path: downloads/