diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 20a532f210..e6a06ad9ed 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 @@ -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: @@ -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: @@ -114,7 +113,6 @@ jobs: tests: name: Tests needs: [d, Build] - if: always() && needs.Build.result == 'success' strategy: fail-fast: false matrix: @@ -141,7 +139,6 @@ jobs: np-tests: name: NP Tests needs: [d, Build] - if: always() && needs.Build.result == 'success' strategy: fail-fast: false matrix: @@ -170,7 +167,6 @@ jobs: lr-tests: name: LR Tests needs: [d, Build] - if: always() && needs.Build.result == 'success' strategy: fail-fast: false matrix: