Skip to content

Commit

Permalink
use melange caching
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Nov 21, 2023
1 parent 98dbb4e commit 1450bca
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,32 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.20.x'
go-version: '^1.20.0'
cache: true

- name: template melange and apko configs
run: |
export GIT_TAG=${{ needs.generate-tag.outputs.tag }}
envsubst "${GIT_TAG}" < deploy/melange.yaml.tmpl > deploy/melange.yaml
envsubst "${GIT_TAG}" < deploy/apko.yaml.tmpl > deploy/apko.yaml
- uses: chainguard-dev/actions/melange-build@main
with:
config: deploy/melange.yaml
archs: x86_64
sign-with-temporary-key: true
# use chainguard-dev/actions/melange-build@main action below instead when caching support is added
- name: set up melange
uses: chainguard-dev/actions/setup-melange@main

- name: build with melange
run: |
melange build \
--config deploy/melange.yaml \
--archs x86_64 \
--signing-key ${{ github.workspace }}/melange.rsa \
--cache-dir "$(go env GOMODCACHE)"
# - uses: chainguard-dev/actions/melange-build@main
# with:
# config: deploy/melange.yaml
# archs: x86_64
# sign-with-temporary-key: true

- uses: chainguard-images/actions/apko-publish@main
with:
Expand Down

0 comments on commit 1450bca

Please sign in to comment.