Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker image creation from develop branch #2296

Merged
merged 1 commit into from
Mar 26, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/testing-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- develop
workflow_dispatch:

jobs:
test-develop:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/testing-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
workflow: testing-stable.yml
ref: stable

test-develop-scheduled:
uses:
./.github/workflows/testing.yml
with:
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}
trigger-testing-develop:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: benc-uk/[email protected]
with:
workflow: testing-develop.yml
ref: develop
25 changes: 14 additions & 11 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,22 @@ jobs:
source /opt/conda/etc/profile.d/mamba.sh
mamba install -n mss-${{ inputs.branch_name }}-env pyvirtualdisplay

- name: Always rebuild dependencies for scheduled builds
if: ${{ inputs.event_name == 'schedule' && inputs.branch_name == 'stable' && env.triggerdockerbuild != 'yes' }}
- name: Always rebuild dependencies for scheduled builds (started from testing-scheduled.yml)
if: ${{ inputs.event_name == 'workflow_dispatch' }}
run: echo "triggerdockerbuild=yes" >> $GITHUB_ENV

- name: Invoke dockertesting image creation
# The image creation is intentionally only triggered for push events because
# scheduled tests should just check that new dependency versions do not break the
# tests, but should not update the image.
if: ${{ inputs.event_name == 'push' && env.triggerdockerbuild == 'yes' && matrix.order == 'normal' }}
uses: benc-uk/[email protected]
with:
workflow: Update Image testing-${{ inputs.branch_name }}
repo: Open-MSS/dockertesting
ref: main
token: ${{ secrets.PAT }}

- name: Reinstall dependencies if changed
if: ${{ env.triggerdockerbuild == 'yes' }}
run: |
Expand Down Expand Up @@ -76,12 +88,3 @@ jobs:
git config --global --add safe.directory /__w/MSS/MSS
mamba install -n ${{ env.mamba-env }} coveralls
mamba run --no-capture-output -n ${{ env.mamba-env }} coveralls --service=github

- name: Invoke dockertesting image creation
if: ${{ !cancelled() && inputs.event_name == 'push' && env.triggerdockerbuild == 'yes' && matrix.order == 'normal' }}
uses: benc-uk/[email protected]
with:
workflow: Update Image testing-${{ inputs.branch_name }}
repo: Open-MSS/dockertesting
ref: main
token: ${{ secrets.PAT }}
Loading