Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Upgrade to GPT-4 in API calls as it is now generally available #300

Upgrade to GPT-4 in API calls as it is now generally available

Upgrade to GPT-4 in API calls as it is now generally available #300

Workflow file for this run

name: Build container image for backend
on:
push:
paths:
- "story_generator/**"
pull_request:
paths:
- "story_generator/**"
workflow_dispatch:
jobs:
verify-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
if: github.ref == 'refs/heads/main'
with:
token: ${{ secrets.DEPLOY_TOKEN }}
# make checkout possible on dependabot PRs
# (where secret is not available) and also others
- uses: actions/checkout@v3
if: github.ref != 'refs/heads/main'
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Check formatting
working-directory: story_generator
run: |
cargo fmt -- --check
- name: Run clippy to check for possible errors
working-directory: story_generator
run: |
cargo clippy --all -- -D warnings
- name: Run tests
working-directory: story_generator
run: |
cargo test
- uses: docker/login-action@v2
if: github.ref == 'refs/heads/main'
with:
registry: ghcr.io
username: themkat
password: ${{ secrets.DEPLOY_TOKEN }}
- name: Build and push image
if: github.ref == 'refs/heads/main'
working-directory: story_generator
run: |
docker build -t ghcr.io/themkat/aitales_story_generator:$GITHUB_SHA .
docker push ghcr.io/themkat/aitales_story_generator:$GITHUB_SHA