Skip to content
Closed
Next Next commit
Only apply fixes for PRs
  • Loading branch information
tobiasdiez authored Sep 28, 2023
commit 97bfb3a5d6728ffabf9b6bd3316f499ffa1e45f6
30 changes: 10 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,26 @@ concurrency:
cancel-in-progress: true

jobs:
get_ci_fixes:
build:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install GH CLI
uses: dev-hanz-ops/[email protected]
if: ${{ github.event_name == 'pull_request' }}
with:
gh-cli-version: 2.32.0

- name: Merge CI fixes from sagemath/sage
if: ${{ github.event_name == 'pull_request' }}
run: |
.ci/merge-fixes.sh
env:
GH_TOKEN: ${{ github.token }}
- name: Store CI fixes in upstream artifact
run: |
mkdir -p upstream
if git format-patch --stdout test_base > ci_fixes.patch; then
cp ci_fixes.patch upstream/
fi
- uses: actions/upload-artifact@v3
with:
path: upstream
name: upstream

build:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
needs: [get_ci_fixes]
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Update system packages
id: prepare
Expand Down