prewarm-ccache.yml 958 B

123456789101112131415161718192021222324252627282930
  1. name: Prewarm-Ccache
  2. on:
  3. schedule:
  4. - cron: "0 4 * * *" # At 04:00 every day
  5. workflow_dispatch:
  6. jobs:
  7. build:
  8. runs-on: [self-hosted, auto-provisioned]
  9. strategy:
  10. fail-fast: false
  11. matrix:
  12. version: ["ubuntu-2204", "ubuntu-2004", "ubuntu-1804"]
  13. steps:
  14. - name: Checkout
  15. uses: actions/checkout@v3
  16. - name: build
  17. shell: bash
  18. run: |
  19. echo "::group::docker-build"
  20. docker build -f .github/prewarm/${{ matrix.version }}.dockerfile -t $IMG .
  21. echo "::endgroup::"
  22. docker run --rm -v `pwd`:/ydbwork/ydb \
  23. -e CCACHE_REMOTE_STORAGE="${CCACHE_REMOTE_STORAGE}" \
  24. $IMG \
  25. bash /ydbwork/ydb/.github/prewarm/build.sh
  26. env:
  27. IMG: runner-${{ matrix.version }}
  28. CCACHE_REMOTE_STORAGE: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}}