aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/prewarm-ccache.yml
blob: dc86bb83f49dea2609cbcc9e9e78aff689880d8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Prewarm-Ccache
on:
  schedule:
    - cron: "0 4 * * *"  # At 04:00 every day
  workflow_dispatch:

jobs:
  build:
    runs-on: [self-hosted, auto-provisioned]
    strategy:
      fail-fast: false
      matrix:
        version: ["ubuntu-2204", "ubuntu-2004", "ubuntu-1804"]
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: build
        shell: bash
        run: |
          echo "::group::docker-build"
          docker build -f .github/prewarm/${{ matrix.version }}.dockerfile -t $IMG .
          echo "::endgroup::"
          
          docker run --rm -v `pwd`:/ydbwork/ydb \
            -e CCACHE_REMOTE_STORAGE="${CCACHE_REMOTE_STORAGE}" \
            $IMG \
            bash /ydbwork/ydb/.github/prewarm/build.sh
        env:
          IMG: runner-${{ matrix.version }}
          CCACHE_REMOTE_STORAGE: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}}