Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/publish.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
release:
types: [created]

jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry==1.4.0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- run: poetry check
- run: poetry install
- name: Build and publish
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build

ghcr:
name: Publish to GHCR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
push: true
target: cli
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/stackmasters/cycleops:${{ github.event.release.name }}
ghcr.io/stackmasters/cycleops:latest
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM ghcr.io/withlogicco/poetry:1.4.0-python-3.11
FROM ghcr.io/withlogicco/poetry:1.4.0-python-3.11 as base

WORKDIR /usr/src/app
COPY pyproject.toml poetry.lock ./
RUN poetry check && poetry lock --check
RUN poetry install

COPY ./ ./

FROM base as cli

RUN poetry install
ENTRYPOINT [ "cycleops" ]

FROM base
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ This is the official command line interface for the Cycleops API.

## Requirements

* Python 3.11 or later
To run the Cycleops CLI either Python 3.1 or newer, or Docker is required.

## Installation

The Cycleops CLI is available on PyPI and you can install it through your favorite package manager:
### Python

The Cycleops CLI is available as a Python package on PyPI:

```console
pip install cycleops
CYCLEOPS_API_KEY=your-api-key cycleops --help
```

### Docker

If your system is running Docker, you can also use Cycleops directly its Docker image:

```console
docker run -e CYCLEOPS_API_KEY=your-api-key ghcr.io/stackmasters/cycleops --help
```

## Usage
Expand Down Expand Up @@ -196,4 +207,3 @@ $ cycleops setups deploy default-container-ngnix
## License

This project is licensed under the [`MIT License`](LICENSE)