Skip to content

Commit

Permalink
Feat: Implment dependency update as reusable workflow (#125)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions authored Jul 31, 2024
1 parent 67ae172 commit 5e8173d
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 40 deletions.
33 changes: 0 additions & 33 deletions .github/actions/python-export-dependencies/action.yaml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/python-dependencies-reusable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 The Linux Foundation <https://linuxfoundation.org>

name: "♻️ Python Update Dependencies"

# yamllint disable-line rule:truthy
on:
workflow_call:
inputs:
PYTHON-VERSION:
description: "Python version to use with PDM"
type: string
required: false
default: "3.10"
secrets:
GH_TOKEN:
description: "GitHub Token"
required: true

concurrency:
cancel-in-progress: true
# yamllint disable-line rule:line-length
group: python-dependencies-${{ github.workflow }} || github.run_id }}

jobs:
update-dependencies:
name: "Run: pdm-project/update-deps-action"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4

- name: "Update Python Dependencies"
uses: pdm-project/[email protected]
with:
sign-off-commit: "true"
token: ${{ secrets.GH_TOKEN }}
commit-message: "Chore: Update dependencies and pdm.lock [skip ci]"
pr-title: "Update Python Dependencies"
update-strategy: eager
# Whether to install PDM plugins before update
install-plugins: "false"
30 changes: 30 additions & 0 deletions .github/workflows/python-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 The Linux Foundation <https://linuxfoundation.org>

name: "♻️ Python Update Dependencies"

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
- "*"
- "!update-devops-tooling"

jobs:
update:
name: "Run: pdm-project/update-deps-action"
runs-on: "ubuntu-latest"
steps:
- name: "Update Python Dependencies"
uses: os-climate/devops-reusable-workflows/.github/workflows/python-dependencies-reusable@main
with:
sign-off-commit: "true"
token: ${{ secrets.GH_TOKEN }}
commit-message: "Chore: Update dependencies and pdm.lock [skip ci]"
pr-title: "Update Python Dependencies"
update-strategy: eager
# Whether to install PDM plugins before update
install-plugins: "false"
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!-- markdownlint-disable -->
<!-- prettier-ignore-start -->
> [!IMPORTANT]
> On June 26 2024, Linux Foundation announced the merger of its financial services umbrella, the Fintech Open Source Foundation ([FINOS](https://finos.org)), with OS-Climate, an open source community dedicated to building data technologies, modeling, and analytic tools that will drive global capital flows into climate change mitigation and resilience; OS-Climate projects are in the process of transitioning to the [FINOS governance framework](https://community.finos.org/docs/governance); read more on [finos.org/press/finos-join-forces-os-open-source-climate-sustainability-esg](https://finos.org/press/finos-join-forces-os-open-source-climate-sustainability-esg)
<!-- prettier-ignore-end -->
<!-- markdownlint-enable -->
# GitHub Actions Reusable Workflows

[![🔐 CodeQL](https://github.com/os-climate/devops-reusable-workflows/actions/workflows/codeql.yaml/badge.svg)](https://github.com/os-climate/devops-reusable-workflows/actions/workflows/codeql.yaml)

[![Dependabot Updates](https://github.com/os-climate/devops-reusable-workflows/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/os-climate/devops-reusable-workflows/actions/workflows/dependabot/dependabot-updates)

## Repository: devops-reusable-workflows

This repository contains a number of reusable workflows. The purpose of these
Expand Down

0 comments on commit 5e8173d

Please sign in to comment.