Rev and Publish Eidolon Projects #446
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: Rev and Publish Python Projects | |
on: | |
workflow_run: | |
workflows: ["Test Python"] # The name of the test workflow | |
types: | |
- completed | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rev: | |
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
fetch-depth: 0 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'poetry' | |
- name: "Versioning Eidolon Dependencies" | |
run: | | |
make version | |
echo "TAGGING_MESSAGE=$(make -C scripts -s run get_tags)" >> $GITHUB_ENV | |
- run: make lock | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "bumping versions" | |
tagging_message: ${{ env.TAGGING_MESSAGE }} | |
publish_pypi: | |
runs-on: ubuntu-latest | |
needs: rev | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'poetry' | |
- name: "Publishing changes to PyPI" | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} | |
make publish | |
docker_sdk: | |
runs-on: ubuntu-latest | |
needs: rev | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: "Versioning Eidolon Dependencies" | |
run: make maybe_docker_push | |
working-directory: sdk | |
docker_webui: | |
runs-on: ubuntu-latest | |
needs: rev | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: "Versioning Eidolon Dependencies" | |
run: make maybe_docker_push | |
working-directory: webui |