Skip to content

Commit

Permalink
set correct context
Browse files Browse the repository at this point in the history
  • Loading branch information
voigt committed Nov 27, 2023
1 parent b6a45d6 commit e0dcc3d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
fail-fast: false
matrix:
include:
- dockerfile: ./example-1-sidecars/Dockerfile
- dockerfile: ./example-1-sidecars
image: ghcr.io/liquid-reply/k8s-spin/spin-static-server
- dockerfile: ./example-2-redis/Dockerfile
- dockerfile: ./example-2-redis
image: ghcr.io/liquid-reply/k8s-spin/spin-redis
steps:
- name: Checkout
Expand Down Expand Up @@ -53,9 +53,9 @@ jobs:
name: Build and push Docker image
uses: docker/build-push-action@v5
with:
# context: .
context: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
file: ${{ matrix.dockerfile }}
file: ${{ matrix.dockerfile }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
tags: |
${{ matrix.image }}:latest
Expand Down
Binary file removed bin/spin_static_fs.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions example-1-sidecars/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM scratch
COPY ./example-1-sidecars/spin.toml ./spin.toml
COPY ../bin/spin_static_fs.wasm ./spin_static_fs.wasm
COPY ./spin.toml ./spin.toml
COPY ./spin_static_fs.wasm ./spin_static_fs.wasm
14 changes: 8 additions & 6 deletions example-1-sidecars/spin.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
spin_manifest_version = "1"
spin_manifest_version = 2

[application]
authors = ["Christoph Voigt <[email protected]>"]
description = "This Spin application serves static files"
name = "static-server"
trigger = { type = "http", base = "/" }
version = "0.1.0"

[[component]]
[[trigger.http]]
route = "/..."
component = "static-server"

[component.static-server]
source = "./spin_static_fs.wasm"
id = "static-server"
files = [{ source = "data", destination = "/" }]
[component.trigger]
route = "/..."
Binary file added example-1-sidecars/spin_static_fs.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions example-2-redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM scratch
COPY ./example-2-redis/spin.toml ./spin.toml
COPY spin.toml spin.toml

# Remove this line once done testing
COPY ./example-2-redis/redis/runtime_config.toml ./runtime_config.toml
COPY ./redis/runtime_config.toml ./runtime_config.toml

COPY ../bin/env_explorer.wasm ./env_explorer.wasm
COPY ./env_explorer.wasm ./env_explorer.wasm
Binary file added example-2-redis/env_explorer.wasm
Binary file not shown.

0 comments on commit e0dcc3d

Please sign in to comment.