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

don't skip the "build platforms" job even when there are no platforms to build #283

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 4 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,24 @@ jobs:
build-platforms:
name: Build Platforms
needs: d
if: needs.d.outputs.missing-platforms != '[]'
strategy:
fail-fast: false
matrix:
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}}
runs-on: ["self-hosted", "enf-x86-beefy"]
platform: ${{ needs.d.outputs.missing-platforms == '[]' && fromJSON('["none"]') || fromJSON(needs.d.outputs.missing-platforms) }}
runs-on: ${{ matrix.platform == 'none' && 'ubuntu-latest' || fromJSON('["self-hosted", "enf-x86-beefy"]') }}
permissions:
packages: write
contents: read
steps:
- name: Login to Container Registry
if: matrix.platform != 'none'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
if: matrix.platform != 'none'
uses: docker/build-push-action@v3
with:
push: true
Expand All @@ -59,7 +60,6 @@ jobs:

Build:
needs: [d, build-platforms]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -89,7 +89,6 @@ jobs:
dev-package:
name: Build leap-dev package
needs: [d, Build]
if: always() && needs.Build.result == 'success'
runs-on: ubuntu-latest
container: ${{fromJSON(needs.d.outputs.p)['ubuntu20'].image}}
steps:
Expand All @@ -114,7 +113,6 @@ jobs:
tests:
name: Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success'
strategy:
fail-fast: false
matrix:
Expand All @@ -141,7 +139,6 @@ jobs:
np-tests:
name: NP Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -170,7 +167,6 @@ jobs:
lr-tests:
name: LR Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success'
strategy:
fail-fast: false
matrix:
Expand Down