From 310a9d41d1f1abc41c74dbe1d832cddde2eb9cc0 Mon Sep 17 00:00:00 2001 From: Ragnar Laud Date: Fri, 12 Jan 2024 00:50:32 +0200 Subject: [PATCH] Add serverless-hello-world package --- .github/workflows/build-hello-world.yml | 29 +++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-hello-world.yml diff --git a/.github/workflows/build-hello-world.yml b/.github/workflows/build-hello-world.yml new file mode 100644 index 0000000..91b2f29 --- /dev/null +++ b/.github/workflows/build-hello-world.yml @@ -0,0 +1,29 @@ +name: build-functions + +on: + push: + branches: + - main + +jobs: + hello-world: + runs-on: ubuntu-latest + steps: + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to ghcr.io + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + file: ./functions/hello-world/Dockerfile + context: ./functions/hello-world + tags: ghcr.io/${{ github.repository_owner }}/serverless-hello-world:latest diff --git a/README.md b/README.md index 110dbcf..19f0852 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ curl http://localhost:9999/v1/routes ### Creating functions ```sh curl http://localhost:9999/v1/functions -sd '{ - "image": "ghcr.io/xprnio/go-serverless/hello-world:latest" + "image": "ghcr.io/xprnio/serverless-hello-world:latest" }' ```