Skip to content

Commit

Permalink
chore: disable runner cache for release note drafter (#1051)
Browse files Browse the repository at this point in the history
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

Disables the go cache for the release note drafter to avoid pulling in
4gi of cached data onto our instances (so we avoid no space left on
device issues)

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
  • Loading branch information
jakobmoellerdev authored Nov 5, 2024
1 parent c722d03 commit 9f7a730
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,6 @@ jobs:
go-version-file: '${{ github.workspace }}/go.mod'
cache: false

- name: Get go environment for use with cache
run: |
echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
# This step will only reuse the go mod and build cache from main made during the Build,
# see push_ocm.yaml => "ocm-cli-latest" Job
# This means it never caches by itself and PRs cannot cause cache pollution / thrashing
# This is because we have huge storage requirements for our cache because of the mass of dependencies
- name: Restore / Reuse Cache from central build
id: cache-golang-restore
uses: actions/cache/restore@v4 # Only Restore, not build another cache (too big)
with:
path: |
${{ env.go_cache }}
${{ env.go_modcache }}
key: ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ env.cache_name }}-${{ runner.os }}-go-
env:
cache_name: ocm-cli-latest-go-cache # needs to be the same key in the end as in the build step

- name: Set Version
run: |
RELEASE_VERSION=v$(go run $GITHUB_WORKSPACE/api/version/generate print-version)
Expand Down

0 comments on commit 9f7a730

Please sign in to comment.