Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update GitHub actions #23

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Docs
on: [push, pull_request, workflow_dispatch]
name: Generate and Publish Documentation for OSML Imagery Toolkit

on:
workflow_call:

permissions:
contents: write

jobs:
docs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -19,7 +24,6 @@ jobs:
tox -e docs
- name: Deploy
uses: peaceiris/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/osml-imagery-toolkit-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "OSML Imagery Toolkit Build Workflow"

on:
pull_request:
branches: ["main", "dev"]

jobs:
Build_Validate_Tox:
uses: ./.github/workflows/python-tox.yml
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/osml-imagery-toolkit-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "OSML Imagery Toolkit Build and Publish Workflow"

on:
push:
branches: ["main"]

jobs:
Build_Validate_Tox:
uses: ./.github/workflows/python-tox.yml
secrets: inherit
Publish_Python:
needs: [Build_Validate_Tox]
uses: ./.github/workflows/python-publish.yml
secrets: inherit
Publish_Documentation:
needs: [Publish_Python]
uses: ./.github/workflows/documentation-publish.yml
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Publish Python Package

on:
workflow_call:
release:
types: [published]

Expand All @@ -17,9 +18,8 @@ permissions:

jobs:
deploy:

if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Tox Build/Validation
name: Build/Validation with Tox

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
ssh-key: ${{ secrets.git_ssh_key }}
lfs: 'true'
ssh-key: ${{ secrets.git_ssh_key }}
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
Expand Down