Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update watchdogs for function authentication #10

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,23 @@ jobs:
id: get_repo_owner
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV

- name: Docker Login
run: >
echo ${{ secrets.GITHUB_TOKEN }} |
docker login ghcr.io --username
${{ env.REPO_OWNER }}
--password-stdin
- name: Publish multi-arch functions
- name: Pull templates
run: faas-cli template pull

- name: Build multi-arch functions
run: >
OWNER="${{ env.REPO_OWNER }}"
TAG="latest"
SERVER="ghcr.io"
faas-cli publish
--extra-tag ${{ github.sha }}
faas-cli build
--build-arg GO111MODULE=on
--platforms linux/arm/v7,linux/arm64,linux/amd64
-f stack.yml

- name: Publish amd64-only functions
- name: Build amd64-only functions
run: >
OWNER="${{ env.REPO_OWNER }}"
TAG="latest"
SERVER="ghcr.io"
faas-cli publish
--extra-tag ${{ github.sha }}
--platforms linux/amd64
faas-cli build
-f stack-amd64.yml

58 changes: 58 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: publish

on:
push:
branches:
- 'master'

jobs:
build:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

permissions:
packages: write
checks: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Get faas-cli
run: curl -sLSf https://cli.openfaas.com | sudo sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get Repo Owner
id: get_repo_owner
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV

- name: Docker Login
run: >
echo ${{ secrets.GITHUB_TOKEN }} |
docker login ghcr.io --username
${{ env.REPO_OWNER }}
--password-stdin
- name: Publish multi-arch functions
run: >
OWNER="${{ env.REPO_OWNER }}"
TAG="latest"
SERVER="ghcr.io"
faas-cli publish
--extra-tag ${{ github.sha }}
--build-arg GO111MODULE=on
--platforms linux/arm/v7,linux/arm64,linux/amd64

- name: Publish amd64-only functions
run: >
OWNER="${{ env.REPO_OWNER }}"
TAG="latest"
SERVER="ghcr.io"
faas-cli publish
--extra-tag ${{ github.sha }}
--platforms linux/amd64
-f stack-amd64.yml
2 changes: 1 addition & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion curl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion ffmpeg/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion figlet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion hey/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16-alpine as builder

ARG TARGETPLATFORM
Expand Down
2 changes: 1 addition & 1 deletion imagemagick/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion nmap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion nslookup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion sentimentanalysis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:3.11

RUN mkdir -p /home/app
Expand Down
2 changes: 1 addition & 1 deletion shasum/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1

Expand Down
2 changes: 1 addition & 1 deletion youtube-dl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.2.2 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.3.1 as watchdog

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.19.1 as ship

Expand Down