Skip to content

Commit

Permalink
feat: Add wolfi image
Browse files Browse the repository at this point in the history
  • Loading branch information
joonas committed Sep 23, 2024
1 parent efe9a8a commit 970f7a5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,19 @@ jobs:
BIN_AMD64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
tags: ghcr.io/${{ env.OWNER }}/wadm:latest,ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION }}

- name: Build and push wolfi (tag)
uses: docker/build-push-action@v6
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
push: true
platforms: linux/amd64,linux/arm64
context: ./
file: ./Dockerfile.wolfi
build-args: |
BIN_ARM64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-aarch64
BIN_AMD64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
tags: ghcr.io/${{ env.OWNER }}/wadm:latest-wolfi,ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION }}-wolfi

- name: Build and push (main)
uses: docker/build-push-action@v6
if: ${{ github.ref == 'refs/heads/main' }}
Expand All @@ -228,3 +241,16 @@ jobs:
BIN_ARM64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-aarch64
BIN_AMD64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
tags: ghcr.io/${{ env.OWNER }}/wadm:canary

- name: Build and push (main)
uses: docker/build-push-action@v6
if: ${{ github.ref == 'refs/heads/main' }}
with:
push: true
platforms: linux/amd64,linux/arm64
context: ./
file: ./Dockerfile.wolfi
build-args: |
BIN_ARM64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-aarch64
BIN_AMD64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
tags: ghcr.io/${{ env.OWNER }}/wadm:canary-wolfi
17 changes: 17 additions & 0 deletions Dockerfile.wolfi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM chainguard/wolfi-base:latest AS base

FROM base AS base-amd64
ARG BIN_AMD64
ARG BIN=$BIN_AMD64

FROM base AS base-arm64
ARG BIN_ARM64
ARG BIN=$BIN_ARM64

FROM base-$TARGETARCH

# Copy application binary from disk
COPY ${BIN} /usr/local/bin/wadm

# Run the application
ENTRYPOINT ["/usr/local/bin/wadm"]

0 comments on commit 970f7a5

Please sign in to comment.