Skip to content

Merge dev into main

Merge dev into main #7

name : CI Pipeline - MAIN
on:
push:
branches:
- main
env:
DOCKER__CONTEXT : "."
DOCKER__FILE : './deploy/docker/osbot_github_actions__from_pip/Dockerfile'
DOCKER_HUB__USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_HUB__TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
GIT__BRANCH : 'main'
PACKAGE_NAME : 'osbot_github_actions'
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Poetry - Install Dependencies
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/poetry__install@dev
with:
pip_install: '-r requirements-test.txt'
- name: Run Unit Tests (using Poetry)
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/poetry__run-unit-tests@dev
increment-tag:
name: Increment Tag - MAIN
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Increment Tag (for MAIN)
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/git__increment-tag@dev
with:
release_type : 'major'
needs:
- run-unit-tests
publish-to-pypi:
permissions:
id-token: write
name: "Publish to PYPI"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: publish-to-pypi
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/pypi__publish@dev
needs:
- increment-tag
# note: in this publish-to-pypi the actions/checkout@v4 needs this token for private repos (due to the id-token: write permission request)
# - uses: actions/checkout@v4
# with:
# token: ${{ secrets.GIT_HUB__ACCESS_TOKEN }}
# ref: dev
publish-to-docker-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Git Update Current Branch
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/git__update_branch@dev
- name: Set $Version from file
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/git__read_version@dev
- name: Deploy to Docker Hub
uses: owasp-sbot/OSBot-GitHub-Actions/.github/actions/docker-hub__publish@dev
needs:
- publish-to-pypi