This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Bump clap from 4.3.24 to 4.4.0 in /story_generator (#204) #340
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@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 |