Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Add first function
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Jan 14, 2023
0 parents commit 1b7da1b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Ruby

on: [push]

jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2

- name: OpenFaaS build and push
uses: mrsimpson/action-openfaas-build@master
with:
stack-file: stack.yml
platforms: linux/amd64
# deploy: ${{ github.ref == 'refs/heads/master' }}
# OpenFaaS gateway URL (http(s)://my-public-gateway.tld)
# openfaas-gateway: ${{ secrets.OPENFAAS_GATEWAY }}
# User for authenticating at OpenFaaS gateway
# openfaas-username: ${{ secrets.OPENFAAS_USERNAME }}
# Password for authenticating at OpenFaaS gateway
# openfaas-password: ${{ secrets.OPENFAAS_PASSWORD }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
template
build
2 changes: 2 additions & 0 deletions hass-listener/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'

5 changes: 5 additions & 0 deletions hass-listener/handler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Handler
def run(req)
return "Hello world from the Ruby template"
end
end
9 changes: 9 additions & 0 deletions stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 1.0
provider:
name: openfaas

functions:
hass-listener:
lang: ruby
handler: ./hass-listener
image: ghcr.io/hass-listener:latest

0 comments on commit 1b7da1b

Please sign in to comment.