Skip to content

Commit

Permalink
Test CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
fmind committed Feb 23, 2024
1 parent c5454ea commit c4b3de1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ jobs:
python-version: 3.12
cache: 'poetry'
- run: poetry install
- run: poetry run inv packages
- run: poetry run inv checks
- run: poetry run inv docs
- run: poetry run inv checks
- run: poetry run inv containers
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/
branch: gh-pages
- uses: docker/build-push-action@v3
with:
push: true
registry: ghcr.io
tags: fmind/bikes:latest
file: ./docker/Dockerfile
- run: docker push ghcr.io/fmind/bikes:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions tasks/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ def compose(ctx: Context) -> None:
@task(pre=[packages.build])
def build(ctx: Context) -> None:
"""Build the container image."""
ctx.run(f"docker build -t fmind/{ctx.project.name}:latest .")
ctx.run(f"docker build -t ghcr.io/fmind/{ctx.project.name}:latest .")


@task
def run(ctx: Context) -> None:
"""Run the container image."""
ctx.run(f"docker run --rm fmind/{ctx.project.name}:latest")
ctx.run(f"docker run --rm ghcr.io/fmind/{ctx.project.name}:latest")


@task(pre=[build, run], default=True)
@task(pre=[build], default=True)
def all(_: Context) -> None:
"""Run all container tasks."""

0 comments on commit c4b3de1

Please sign in to comment.