mirror of
https://github.com/openfaas/faas.git
synced 2025-06-27 01:03:26 +00:00
Convert Basic-Auth to multi-arch
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
74
.github/workflows/build.yml
vendored
74
.github/workflows/build.yml
vendored
@ -7,10 +7,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
# Auth
|
||||
# Watchdog containers
|
||||
# Watchdog bins + shas
|
||||
|
||||
# pull buildargs out of container (stop putting git in)
|
||||
# can then go back to matrix build of containers
|
||||
jobs:
|
||||
|
||||
# Run the CI tests
|
||||
@ -28,8 +27,32 @@ jobs:
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- 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.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||
- name: Build Gateway
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./gateway
|
||||
file: ./gateway/Dockerfile
|
||||
platforms: linux/amd64
|
||||
load: true
|
||||
push: false
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
tags: |
|
||||
ghcr.io/openfaas/gateway:latest-dev
|
||||
- name: Run CI
|
||||
run: make build test-ci
|
||||
run: make test-ci
|
||||
|
||||
build-gateway:
|
||||
runs-on: ubuntu-latest
|
||||
@ -49,45 +72,18 @@ jobs:
|
||||
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
|
||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||
- name: Build ${{ matrix.svc }}
|
||||
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: .
|
||||
context: ./gateway
|
||||
file: ./gateway/Dockerfile
|
||||
outputs: "type=image,push=false"
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
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 }}
|
||||
@ -113,7 +109,7 @@ jobs:
|
||||
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:]')
|
||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||
- name: Build ${{ matrix.svc }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
|
Reference in New Issue
Block a user