Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
- Loading branch information
1 parent
4ced7ca
commit a558307
Showing
11 changed files
with
180 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
# Auth | ||
# Watchdog containers | ||
# Watchdog bins + shas | ||
|
||
jobs: | ||
|
||
# Run the CI tests | ||
build-test: | ||
strategy: | ||
matrix: | ||
go-version: [1.13.x] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Run CI | ||
run: make build test-ci | ||
|
||
build-gateway: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-version: [1.13.x] | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Get TAG | ||
id: get_tag | ||
run: echo ::set-output name=TAG::latest-dev | ||
- name: Get Repo Owner | ||
id: get_repo_owner | ||
run: echo ::set-output name=repo_owner::$(echo ${{ github.event.repository.owner.login }} | tr '[:upper:]' '[:lower:]') | ||
- name: Build Gateway | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./gateway/Dockerfile | ||
outputs: "type=image,push=false" | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
tags: | | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }} | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }} | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:latest | ||
build-watchdog: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-version: [1.13.x] | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Get TAG | ||
id: get_tag | ||
run: echo ::set-output name=TAG::latest-dev | ||
- name: Get Repo Owner | ||
id: get_repo_owner | ||
run: echo ::set-output name=repo_owner::$(echo ${{ github.event.repository.owner.login }} | tr '[:upper:]' '[:lower:]') | ||
- name: Build Watchdog | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./gateway/Dockerfile | ||
outputs: "type=image,push=false" | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
tags: | | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }} | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }} | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:latest | ||
build-auth-containers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-version: [1.13.x] | ||
svc: [ | ||
basic-auth | ||
] | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Get TAG | ||
id: get_tag | ||
run: echo ::set-output name=TAG::latest-dev | ||
- name: Get Repo Owner | ||
id: get_repo_owner | ||
run: echo ::set-output name=repo_owner::$(echo ${{ github.event.repository.owner.login }} | tr '[:upper:]' '[:lower:]') | ||
- name: Build ${{ matrix.svc }} | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./auth/${{ matrix.svc }} | ||
file: ./auth/${{ matrix.svc }}/Dockerfile | ||
outputs: "type=image,push=false" | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||
tags: | | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:${{ steps.get_tag.outputs.TAG }} | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:${{ github.sha }} | ||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/${{ matrix.svc }}:latest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,18 @@ | ||
TAG?=latest | ||
NS?=openfaas | ||
|
||
.PHONY: build | ||
build: | ||
./build.sh | ||
|
||
.PHONY: build-gateway | ||
build-gateway: | ||
(cd gateway; ./build.sh latest-dev) | ||
(cd gateway; docker buildx build --platform linux/amd64 -t $NS/gateway:latest-dev .) | ||
|
||
.PHONY: test-ci | ||
test-ci: | ||
./contrib/ci.sh | ||
|
||
.PHONY: ci-armhf-build | ||
ci-armhf-build: | ||
(cd gateway; ./build.sh $(TAG) ; cd ../auth/basic-auth ; ./build.sh $(TAG)) | ||
|
||
.PHONY: ci-armhf-push | ||
ci-armhf-push: | ||
(cd gateway; ./push.sh $(TAG) ; cd ../auth/basic-auth ; ./push.sh $(TAG)) | ||
|
||
.PHONY: ci-arm64-build | ||
ci-arm64-build: | ||
(cd gateway; ./build.sh $(TAG) ; cd ../auth/basic-auth ; ./build.sh $(TAG)) | ||
|
||
.PHONY: ci-arm64-push | ||
ci-arm64-push: | ||
(cd gateway; ./push.sh $(TAG) ; cd ../auth/basic-auth ; ./push.sh $(TAG)) | ||
.PHONY: binaries | ||
binaries: | ||
echo TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.