Skip to content

Commit

Permalink
ci: add build concurrency (#557)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck authored Jul 12, 2023
1 parent c95e384 commit fbcde26
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@

name: Docker CI

on:
on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REPORTS_DIR: CI_reports
PYTHON_VERISON: "3.10"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/manual-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
required: true
type: string

concurrency:
group: release
cancel-in-progress: false

env:
REPORTS_DIR: CI_reports
DIST_DIR: dist
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ on:
tags: [ 'v*.*.*' ] # run again on release tags to have tools mark them
branches: [ 'master' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REPORTS_DIR: CI_reports
PYTHON_VERISON_DEFAULT: "3.11"
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
- master
workflow_dispatch:

concurrency:
group: release
cancel-in-progress: false

env:
REPORTS_DIR: CI_reports
DIST_DIR: dist
Expand Down Expand Up @@ -88,7 +92,7 @@ jobs:
then
echo "released=true" >> $GITHUB_OUTPUT
fi
env:
env:
VERSION_PRE: ${{ steps.before-release.outputs.version }}
- name: Artifact python dist
if: |
Expand All @@ -102,7 +106,7 @@ jobs:
if-no-files-found: error
# Dist results are required for further processing.
# Therefore, make sure that python-semantic-release is configuret to keep dist.
# see https://python-semantic-release.readthedocs.io/en/latest/configuration.html?highlight=remove_dist#remove-dist
# see https://python-semantic-release.readthedocs.io/en/latest/configuration.html?highlight=remove_dist#remove-dist

release-DockerHub:
name: "Release: DockerHub"
Expand Down Expand Up @@ -132,7 +136,7 @@ jobs:
- name: Fetch python dist artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
with:
with:
name: ${{ env.DIST_ARTIFACT }}
path: ${{ env.DIST_DIR }}/
- name: Build Docker Image (${{ env.VERSION }})
Expand Down

0 comments on commit fbcde26

Please sign in to comment.