aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-08-21 16:59:17 +0100
committerfanquake <fanquake@gmail.com>2023-08-21 16:59:33 +0100
commitded687334031f4790ef6a36b999fb30a79dcf7b3 (patch)
tree4323762907f873306424b6fc94fbf587d2e473ed /.github/workflows/ci.yml
parent723f1c669f9b6babfcb789b7b10bb98d1341da60 (diff)
parent241d6ca34c60d9003a27bb7960cebfb66366753b (diff)
Merge bitcoin/bitcoin#28292: ci: Disable cache save for pull requests in GitHub Actions
241d6ca34c60d9003a27bb7960cebfb66366753b ci: Disable cache save for pull requests in GitHub Actions (Hennadii Stepanov) Pull request description: This PR disable cache save for pull requests in GitHub Actions. Otherwise, multiple pull requests fill GitHub Actions cache quota shortly. See a discussion [here](https://github.com/bitcoin/bitcoin/pull/28187#discussion_r1295459732). --- **NOTE** for the maintainers with "owner" permissions. This PR needs the `actions/cache/restore@*` and `actions/cache/save@*` acrions to be explicitly allowed in the repository's Actions permissions. ACKs for top commit: MarcoFalke: lgtm ACK 241d6ca34c60d9003a27bb7960cebfb66366753b Tree-SHA512: a7786c7ec99bfa6991bf6ae08fd7ed3546e8c5d083a1b2bae7638f6f31e77fdf2cf4fc69d85834faf87f98db1f4a82026ce1dc5fc1bc6650e8bf1c09bf7e90f5
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml16
1 files changed, 12 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f5695d01cc..87668cd662 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -51,12 +51,20 @@ jobs:
- name: Set Ccache directory
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
- - name: Ccache cache
- uses: actions/cache@v3
+ - name: Restore Ccache cache
+ uses: actions/cache/restore@v3
with:
path: ${{ env.CCACHE_DIR }}
- key: ${{ github.job }}-ccache-cache-${{ github.run_id }}
- restore-keys: ${{ github.job }}-ccache-cache
+ key: ${{ github.job }}-ccache-${{ github.run_id }}
+ restore-keys: ${{ github.job }}-ccache-
- name: CI script
run: ./ci/test_run_all.sh
+
+ - name: Save Ccache cache
+ uses: actions/cache/save@v3
+ if: github.event_name != 'pull_request'
+ with:
+ path: ${{ env.CCACHE_DIR }}
+ # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
+ key: ${{ github.job }}-ccache-${{ github.run_id }}