Skip to content

Commit

Permalink
support go mod cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Nov 21, 2023
1 parent 010fbbd commit 8df16fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,16 @@ jobs:
# --signing-key ${{ github.workspace }}/melange.rsa \
# --cache-dir "$(go env GOMODCACHE)"

- id: cache-dir
run: echo "cache_dir=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

# - uses: chainguard-dev/actions/melange-build@main
- uses: sgalsaleh/chainguard-dev-actions/melange-build@4824ef7293e21e9d66749bd24cfd2a11f9d05dfa
with:
config: deploy/melange.yaml
archs: x86_64
sign-with-temporary-key: true
cache-dir: ${{ steps.cache-dir.outputs.cache_dir }}

- uses: chainguard-images/actions/apko-publish@main
with:
Expand Down
2 changes: 2 additions & 0 deletions deploy/melange.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ environment:
- go
- nodejs
- yarn
environment:
GOMODCACHE: '/var/cache/melange'

pipeline:
- runs: |
Expand Down

0 comments on commit 8df16fa

Please sign in to comment.