Skip to content

renaming + fixes

renaming + fixes #42

Workflow file for this run

name: Build
on:
push:
branches: [main]
jobs:
build:
permissions: write-all
name: Build and Deploy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata from repository
uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push to ghcr.io
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Push to ghcr.io with retries
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: echo "${{ steps.meta.outputs.tags }}" | while IFS= read -r i; do echo "Pushing $i"; docker push $i; done
- name: Deploy to Kubernetes cluster
uses: daviFrag/helm@master
with:
release: 'skapi-prod'
namespace: 'skapi-prod'
chart: 'helm/skapi'
token: '${{ github.token }}'
values: |
url: skapi.polyglot-edu.com
cfOriginKey: ${{ secrets.CFORIGIN }}
dockerconfigjson: ${{ secrets.DOCKER_CONFIG }}
image:
repository: ${{ steps.meta.outputs.tags }}
env:
openAiSecret: ${{ secrets.OPENAPI_SECRET_KEY }}
openAiEndpoint: ${{ secrets.OPENAPI_ENDPOINT }}
openAiGpt35Dn: ${{ secrets.GPT_35_TURBO_DN }}
secretToken: ${{ secrets.SECRET_TOKEN }}
env:
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}'