Skip to content

Commit

Permalink
modified cache workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
phoepsilonix committed Feb 11, 2025
1 parent 3bdf416 commit 86c0394
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,13 @@ jobs:
sudo -u ${NON_ROOT} bazel --version
DEFAULT_USER=$(whoami)
sudo chown -R ${DEFAULT_USER}:${DEFAULT_USER} /github/workspace/.cache/bazel/
sudo mkdir -p ./.cache/bazel
- name: Bazel Cache
uses: actions/cache@v4
with:
path: |
${{ env.XDG_CACHE_HOME }}bazel
./.cache/bazel
key: bazel-${{ steps.startup.outputs.container_name }}-${{ steps.variables.outputs.base_tag }}-${{ steps.variables.outputs.tag_commit }}
restore-keys: |
bazel-${{ steps.startup.outputs.container_name }}-${{ steps.variables.outputs.base_tag }}-
Expand All @@ -278,6 +279,7 @@ jobs:
USE_BAZEL_VERSION: "8.0.1"
shell: bash
run: |
sudo cp -af ./.cache/bazel ${{ env.XDG_CACHE_HOME }}/
NON_ROOT="${{ steps.startup.outputs.non_root }}"
export PATH=$HOME/bin:$PATH
sudo cp -a debian source/
Expand Down Expand Up @@ -403,6 +405,9 @@ jobs:
echo $DEFAULT_USER
sudo chown -R ${DEFAULT_USER}:${DEFAULT_USER} ${{ env.XDG_CACHE_HOME }}
fi
cd
sudo cp -af ${{ env.XDG_CACHE_HOME }}bazel/ ./.cache/
sudo chown -R root:root ./.cache/bazel/
- name: Generate release note
id: release_note_2
shell: bash
Expand Down

0 comments on commit 86c0394

Please sign in to comment.