Skip to content

examples: add jwt example (#43) #58

examples: add jwt example (#43)

examples: add jwt example (#43) #58

Workflow file for this run

name: Release
# This file is very verbose, but things have to be split into separate jobs to
# allow them to run in parallel. There seems to be no way to share the Docker
# build context between jobs, so the Docker set-up has to be copied in each one.
on:
push:
tags:
- 'v*.*.*'
jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: "Prune docker"
run: "docker system prune -f --all"
build-images:
needs: clean
runs-on: ubuntu-latest
steps:
- name: "Get the code"
uses: actions/checkout@v4
with:
submodules: true
- name: "Set version variables"
run: |
CPP_VER=$(cat cpp/VERSION)
PYTHON_VER=$(cat python/VERSION)
echo "CPP_VERSION=$CPP_VER" >> $GITHUB_ENV
echo "PYTHON_VERSION=$PYTHON_VER" >> $GITHUB_ENV
echo "EXAMPLES_VERSION=${CPP_VER}_${PYTHON_VER}" >> $GITHUB_ENV
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
- name: "Log in to DockerHub"
uses: docker/login-action@v3
with:
registry: faasm.azurecr.io
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
- name: "Build and push examples-build image"
uses: docker/build-push-action@v4
with:
push: true
file: docker/build.dockerfile
build-args: |
CPP_VERSION=${{ env.CPP_VERSION }}
EXAMPLES_VERSION=${{ env.EXAMPLES_VERSION }}
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
context: .
tags: faasm.azurecr.io/examples-build:${{ env.EXAMPLES_VERSION }}