Skip to content

Build K8s Images

Build K8s Images #1

Workflow file for this run

name: Build K8s Images
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Datatracker API client
run: |
wget -O rpcapi.yaml https://raw.githubusercontent.com/ietf-tools/datatracker/feat/rpc-api/rpcapi.yaml
npx --yes @openapitools/openapi-generator-cli generate --generator-key datatracker
tar cfz rpcapi_client.tgz -C openapi rpcapi_client
- name: Build backend image
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
file: dev/build/backend.Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/ietf-tools/rpc-purple-backend:latest
- name: Generate Purple API client
run: |
container_id="$(docker create ghcr.io/ietf-tools/rpc-purple-backend:latest)"
docker cp "${container_id}:/workspace/purple-api.yaml" ./
docker rm "${container_id}"
npx --yes @openapitools/openapi-generator-cli generate --generator-key purple
tar cfz rpctracker_client.tgz -C client rpctracker_client
- name: Upload API
uses: actions/upload-artifact@v4
with:
name: api-clients
path: |
purple-api.yaml
rpcapi.yaml
rpcapi_client.tgz
rpctracker_client.tgz
- name: Build frontend image
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
file: dev/build/frontend.Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/ietf-tools/rpc-purple-frontend:latest