This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Bump serde_json from 1.0.111 to 1.0.120 in /story_generator #459
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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@v4 | |
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@v3 | |
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 |