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
72 changes: 72 additions & 0 deletions .github/workflows/delete-old-runs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This workflow will delete old workflow runs based on the input parameters.
# https://github.com/Mattraks/delete-workflow-runs

name: Delete old workflow runs

on:
# Run monthly, at 00:00 on the 1st day of month.
schedule:
- cron: '0 0 1 * *'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

inputs:
days:
description: 'Number of days.'
required: true
default: 30
minimum_runs:
description: 'The minimum runs to keep for each workflow.'
required: true
default: 6
delete_workflow_pattern:
description: 'The name or filename of the workflow. if not set then it will target all workflows.'
required: false
delete_workflow_by_state_pattern:
description: 'Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
required: true
default: "All"
type: choice
options:
- "All"
- active
- deleted
- disabled_inactivity
- disabled_manually
delete_run_by_conclusion_pattern:
description: 'Remove workflow by conclusion: action_required, cancelled, failure, skipped, success'
required: true
default: "All"
type: choice
options:
- "All"
- action_required
- cancelled
- failure
- skipped
- success
dry_run:
description: 'Only log actions, do not perform any delete operations.'
required: false

jobs:
del-runs:

runs-on: ubuntu-latest

permissions:
actions: write

steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: ${{ github.event.inputs.days }}
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }}
dry_run: ${{ github.event.inputs.dry_run }}
39 changes: 39 additions & 0 deletions .github/workflows/ossar-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Integrates a collection of open source static analysis tools with GitHub code scanning.
# https://github.com/github/ossar-action

name: Run security static analysis

on:
# Runs on pull requests
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
ossar-analysis:
# OSSAR runs on windows-latest.
# ubuntu-latest and macos-latest support coming soon
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Run open source static analysis tools
uses: github/ossar-action@main
id: ossar

- name: Upload results to Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
40 changes: 40 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Builds a Python package and publish it to PyPI when a new tag is created.

name: Upload release to PyPI

on:
# Runs on creating a new tag starting with 'v', e.g. 'v1.0.3'
push:
tags:
- 'v*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
pypi-publish:

runs-on: ubuntu-latest

steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Upgrade package installer for Python
run: pip install --upgrade pip

- name: Install Python dependencies
run: pip install '.[dev]'

- name: Create Python package
run: python -m build

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PASSWORD }}
37 changes: 0 additions & 37 deletions .github/workflows/pypi_publish.yml

This file was deleted.

102 changes: 0 additions & 102 deletions .github/workflows/python-ci.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Drafts your next Release notes as pull requests are merged into default branch

name: Update release draft

on:
# Runs on pushes targeting the default branch
push:
branches: [master]

jobs:
update-release-draft:

runs-on: ubuntu-latest

steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading