mirror of https://github.com/knative/func.git
workflows
This commit is contained in:
parent
161540c789
commit
287df42499
|
@ -0,0 +1,20 @@
|
|||
# Build and test every push to the main and
|
||||
# develop branches.
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- name: Test
|
||||
run: make test
|
||||
- name: Build
|
||||
run: make build
|
|
@ -0,0 +1,15 @@
|
|||
# Build and test all pull requests
|
||||
name: Pull Requests
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- name: Test
|
||||
run: make test
|
||||
- name: Build
|
||||
run: make build
|
|
@ -0,0 +1,30 @@
|
|||
# Deploy artifacts for any pushes with a version tag (releases).
|
||||
name: Releases
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
- name: Test
|
||||
run: make test
|
||||
- name: Build
|
||||
run: make build
|
||||
- name: Image
|
||||
run: make image
|
||||
- name: Push Image
|
||||
env:
|
||||
USER: ${{ secrets.QUAY_USERNAME }}
|
||||
PASS: ${{ secrets.QUAY_PASSWORD }}
|
||||
run: docker login -u "$USER" -p "$PASS" quay.io && make push
|
||||
|
||||
# TODO: make release
|
||||
# - build cross-platform binaries
|
||||
# - create a release with assets
|
1
Makefile
1
Makefile
|
@ -9,6 +9,7 @@ VTAG := $(shell git tag --points-at HEAD)
|
|||
VERS := $(shell [ -z $(VTAG) ] && echo 'tip' || echo $(VTAG) )
|
||||
|
||||
all: $(BIN)
|
||||
build: all
|
||||
|
||||
$(BIN): $(CODE)
|
||||
go build -ldflags "-X main.brch=$(BRCH) -X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
|
||||
|
|
16
README.md
16
README.md
|
@ -1,26 +1,22 @@
|
|||
# faas
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Function as a Service CLI
|
||||
|
||||
## Setup and Configuration
|
||||
|
||||
With Go 1.13+ installed, build and install the binary to your path:
|
||||
```
|
||||
go install
|
||||
go install ./cmd/faas
|
||||
```
|
||||
|
||||
Install dependent binaries:
|
||||
Install Docker
|
||||
|
||||
* `appsody` https://appsody.dev/docs/installing/installing-appsody
|
||||
* `kn` https://github.com/knative/client/releases
|
||||
* `kubectl` https://kubernetes.io/docs/tasks/tools/install-kubectl/
|
||||
* `docker` https://docs.docker.com/get-docker/
|
||||
|
||||
Configure Boson appsody stack repository:
|
||||
```
|
||||
appsody repo add boson https://github.com/boson-project/stacks/releases/latest/download/boson-index.yaml
|
||||
```
|
||||
|
||||
Configure Image repository:
|
||||
|
||||
Both the image repository and user/org namespace need to be defined either by
|
||||
|
|
Loading…
Reference in New Issue