Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove melange from apko build #104

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 2 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,9 @@ jobs:
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: GeoNet/yq@bbe305500687a5fe8498d74883c17f0f06431ac4 # master
- uses: GeoNet/chainguard-dev-actions/setup-melange@c1773c35e73af78f72f606c002e9819cd737984d # main
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs != null }}
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
- uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
- uses: GeoNet/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # main
# apko + Melange build
- name: melange generate snapshot date
id: snapshot-date
run: |
echo name=date::$(date -u +%Y%m%d) >> $GITHUB_OUTPUT
echo name=epoch::$(date -u +%s) >> $GITHUB_OUTPUT
shell: bash
- uses: GeoNet/chainguard-dev-actions/melange-keygen@c1773c35e73af78f72f606c002e9819cd737984d # main
name: melange generate signing keypair
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs != null }}
with:
signing-key-path: ${{ github.workspace }}/melange.rsa
- id: apko-options
env:
DESTINATION: ${{ fromJSON(toJSON(matrix)).destination }}
Expand All @@ -85,43 +71,16 @@ jobs:
TAG="${DESTINATION//ghcr.io\/geonet/localhost}"
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
- uses: GeoNet/chainguard-dev-actions/melange-build-pkg@c1773c35e73af78f72f606c002e9819cd737984d # main
name: melange apk build
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs != null }}
with:
multi-config: ${{ join(fromJSON(toJSON(matrix)).melangeConfigs, ',') }}
signing-key-path: ${{ github.workspace }}/melange.rsa
sign-with-key: true
empty-workspace: true
- uses: GeoNet/chainguard-images-actions/apko-publish@cfc56ba1a26d410474fe453d9c9a865fdd422fa7 # main
id: build-with-signing-key
name: apko build-with-signing-key
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs != null && github.ref == 'refs/heads/main' }}
with:
tag: ${{ fromJSON(toJSON(matrix)).destination }}
config: ${{ fromJSON(toJSON(matrix)).source }}
source-date-epoch: ${{ steps.snapshot-date.outputs.epoch }}
keyring-append: ${{ github.workspace }}/melange.rsa.pub
- uses: GeoNet/chainguard-images-actions/apko-build@cfc56ba1a26d410474fe453d9c9a865fdd422fa7 # main
id: build-with-signing-key-local
name: apko build-with-signing-key local
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs != null && github.ref != 'refs/heads/main' }}
with:
tag: ${{ steps.apko-options.outputs.tag }}
config: ${{ fromJSON(toJSON(matrix)).source }}
source-date-epoch: ${{ steps.snapshot-date.outputs.epoch }}
keyring-append: ${{ github.workspace }}/melange.rsa.pub
# TODO fix temp hack to conditionally pass keyring-append to apko
- uses: GeoNet/chainguard-images-actions/apko-publish@cfc56ba1a26d410474fe453d9c9a865fdd422fa7 # main
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs == null && github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' }}
id: build
name: apko build
with:
tag: ${{ fromJSON(toJSON(matrix)).destination }}
config: ${{ fromJSON(toJSON(matrix)).source }}
source-date-epoch: ${{ steps.snapshot-date.outputs.epoch }}
- uses: GeoNet/chainguard-images-actions/apko-build@cfc56ba1a26d410474fe453d9c9a865fdd422fa7 # main
if: ${{ fromJSON(toJSON(matrix)).melangeConfigs == null && github.ref != 'refs/heads/main' }}
if: ${{ github.ref != 'refs/heads/main' }}
id: build-local
name: apko build local
with:
Expand Down