CI - Released Versions Cache Update #231
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # | |
| # Keeps the GitHub Actions cache of released BookKeeper version tarballs | |
| # up-to-date so that backward-compatibility test containers don't need to | |
| # re-download everything on every run. | |
| # | |
| # The cache key is derived from the hash of the download script. When a new | |
| # version is added to the script the hash changes, the previous cache is | |
| # restored as a starting point (via restore-keys), and only the newly added | |
| # files are downloaded. The schedule trigger ensures the cache is accessed | |
| # regularly so that it never expires due to the GitHub Actions 7-day inactivity | |
| # eviction policy. | |
| # | |
| name: CI - Released Versions Cache Update | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - branch-* | |
| paths: | |
| - 'tests/docker-images/all-released-versions-image/scripts/download-released-versions.sh' | |
| - '.github/workflows/ci-all-released-versions-update.yaml' | |
| schedule: | |
| - cron: '35 */12 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-released-versions-cache: | |
| name: Update released versions cache | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache released versions | |
| id: cache | |
| uses: actions/cache@v4 | |
| timeout-minutes: 10 | |
| with: | |
| path: tests/docker-images/all-released-versions-image/.released-versions | |
| key: released-versions-${{ hashFiles('tests/docker-images/all-released-versions-image/scripts/download-released-versions.sh') }} | |
| restore-keys: | | |
| released-versions- | |
| - name: Download released versions | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: | | |
| bash tests/docker-images/all-released-versions-image/scripts/download-released-versions.sh \ | |
| tests/docker-images/all-released-versions-image/.released-versions |