Skip to content

Commit

Permalink
enable package publish
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-rocket committed Jul 23, 2024
1 parent 00af005 commit fc80e1e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 39 deletions.
69 changes: 31 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# GitHub Actions configuration **EXAMPLE**,
# MODIFY IT ACCORDING TO YOUR NEEDS!
# Reference: https://docs.github.com/en/actions

name: tests
name: build

on:
push:
Expand Down Expand Up @@ -60,7 +56,7 @@ jobs:
strategy:
matrix:
python:
- "3.9" # oldest Python supported by PSF
- "3.10" # oldest Python supported by PSF
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
Expand Down Expand Up @@ -94,35 +90,32 @@ jobs:
flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
parallel: true

# finalize:
# needs: test
# runs-on: ubuntu-latest
# steps:
# - name: Finalize coverage report
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true
#
# publish:
# needs: finalize
# if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with: {python-version: "3.11"}
# - name: Retrieve pre-built distribution files
# uses: actions/download-artifact@v4
# with: {name: python-distribution-files, path: dist/}
# - name: Publish Package
# env:
# # TODO: Set your PYPI_TOKEN as a secret using GitHub UI
# # - https://pypi.org/help/#apitoken
# # - https://docs.github.com/en/actions/security-guides/encrypted-secrets
# TWINE_REPOSITORY: pypi
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# run: pipx run tox -e publish
finalize:
needs: test
runs-on: ubuntu-latest
steps:
- name: Finalize coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

publish:
needs: finalize
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: "3.11"}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v4
with: {name: python-distribution-files, path: dist/}
- name: Publish Package
env:
TWINE_REPOSITORY: pypi
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: pipx run tox -e publish
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
-->

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
[![Coveralls](https://img.shields.io/coveralls/github/imubit/k8s-job-scheduler/main.svg)](https://coveralls.io/r/imubit/k8s-job-scheduler)
[![PyPI-Server](https://img.shields.io/pypi/v/k8s-job-scheduler.svg)](https://pypi.org/project/k8s-job-scheduler/)


# k8s-job-scheduler

A package for managing Kubernetes jobs and cron jobs from Python. It allows running CLI scripts and Python function within native Kubernetes job engine.
A package for managing Kubernetes jobs and cron jobs from Python. It allows running CLI scripts and Python functions within native Kubernetes job engine.
No need to package separate Docker images with functions to be executed - the package can remotely "inject" the Python function into publicly available Docker images.

## Installation

Expand Down

0 comments on commit fc80e1e

Please sign in to comment.