Minor bug fix in servers #380
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
branches: | |
- main | |
paths-ignore: | |
- '**.pyi' | |
- '.bumpversion.cfg' | |
- '.flake8' | |
- '.pre-commit-config.yaml' | |
- '**.md' | |
- '!README.md' | |
- '.github/**' | |
- '!.github/actions/setup-tox/**' | |
- '!.github/workflows/build.yml' | |
- 'docs/**' | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '*' | |
paths-ignore: | |
- '**.pyi' | |
- '.bumpversion.cfg' | |
- '.flake8' | |
- '.pre-commit-config.yaml' | |
- '**.md' | |
- '!README.md' | |
- '.github/**' | |
- '!.github/actions/setup-tox/**' | |
- '!.github/workflows/build.yml' | |
- 'docs/**' | |
workflow_dispatch: | |
inputs: | |
SOURCE_DATE_EPOCH: | |
description: 'SOURCE_DATE_EPOCH value for reproducible builds' | |
required: false | |
type: string | |
artifact-name: | |
description: 'Artifact name' | |
required: true | |
default: 'easynetwork-dist' | |
type: string | |
workflow_call: | |
inputs: | |
SOURCE_DATE_EPOCH: | |
description: 'SOURCE_DATE_EPOCH value for reproducible builds' | |
required: false | |
type: string | |
artifact-name: | |
description: 'Artifact name' | |
required: true | |
type: string | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
if: github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:') | |
runs-on: ubuntu-22.04 | |
env: | |
SOURCE_DATE_EPOCH: ${{ inputs.SOURCE_DATE_EPOCH }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup tox | |
uses: ./.github/actions/setup-tox | |
with: | |
python-version: '3.11' | |
- name: Compute SOURCE_DATE_EPOCH from commit date | |
if: env.SOURCE_DATE_EPOCH == '' | |
run: | | |
date=$(git show ${{ github.sha }} --pretty="%ct" --no-patch) | |
echo "Using SOURCE_DATE_EPOCH=${date}" | |
echo "SOURCE_DATE_EPOCH=${date}" >> $GITHUB_ENV | |
- name: Build packages | |
run: tox run -e build | |
- name: Upload packages as artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ inputs.artifact-name || 'easynetwork-dist' }} | |
path: dist |