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

new workflow to create faas-supervisor-kit image #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
52 changes: 52 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,55 @@ jobs:
supervisor-alpine-arm64/supervisor-alpine-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

push_faas_supervisor_kit:
if: github.event_name == 'release'
needs:
- release-assets
env:
REGISTRY: ghcr.io
IMAGE_NAME: grycap/faas-supervisor-kit
name: Push Docker image to Docker Hub
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}


- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./extra/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FAAS_VERSION=${{ steps.meta.outputs.version }}


- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
9 changes: 9 additions & 0 deletions faassupervisor-kit/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:20.04

ARG FAAS_VERSION

RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y wget unzip
RUN wget -O supervisor.zip https://github.com/grycap/faas-supervisor/releases/download/$FAAS_VERSION/supervisor.zip
RUN unzip supervisor.zip
RUN rm supervisor.zip
Loading