Skip to content

Commit

Permalink
switch to composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmehl committed Sep 20, 2023
1 parent 46c6ed6 commit 80fab6a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 30 deletions.
53 changes: 24 additions & 29 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
name: Reusable build workflow

on:
workflow_call:
inputs:
os:
default: "ubuntu-20.04"
description: "Value for 'runs-on'"
required: false
type: string
python:
default: "3.9"
description: "Value for 'python-version'"
required: false
type: string

jobs:
build:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python }}
- name: Install dependencies
run: |
pip install poetry
poetry install --no-interaction
name: "Reusable build workflow"
inputs:
# os:
# default: "ubuntu-20.04"
# description: "Value for 'runs-on'"
# required: false
# type: string
python:
default: "3.9"
description: "Value for 'python-version'"
required: false
type: string
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python }}
- name: Install dependencies
run: |
pip install poetry
poetry install --no-interaction
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
poetry install --no-interaction
formatting:
uses: ./.github/workflows/build.yml
steps:
- uses: ./.github/workflows/build.yml
- name: Test formatting with isort and black
run: |
poetry run isort --check ossrfc/
Expand Down

0 comments on commit 80fab6a

Please sign in to comment.