fix: select all resources with the given same label #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: Apache-2.0 | |
# Copyright 2023 Authors of Nimbus | |
name: Latest release | |
on: | |
push: | |
branches: | |
- main | |
permissions: read-all | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
files-changed: | |
name: Detect what files changed | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
outputs: | |
nimbus: ${{ steps.filter.outputs.nimbus}} | |
adapters: ${{ steps.filter.outputs.adapters }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/[email protected] | |
id: filter | |
with: | |
filters: | | |
nimbus: | |
- 'cmd/**' | |
- 'internal/**' | |
- 'pkg/processor/**' | |
- 'Dockerfile' | |
- 'Makefile' | |
adapters: | |
- 'pkg/adapter/**' | |
release-nimbus-image: | |
needs: files-changed | |
if: ${{ github.repository == '5GSEC/nimbus' && needs.files-changed.outputs.nimbus == 'true' }} | |
name: Build and push nimbus image | |
uses: ./.github/workflows/release-image.yaml | |
with: | |
WORKING_DIRECTORY: . | |
NAME: nimbus | |
secrets: inherit | |
release-adapters-image: | |
needs: files-changed | |
if: ${{ github.repository == '5GSEC/nimbus' && needs.files-changed.outputs.adapters == 'true' }} | |
strategy: | |
matrix: | |
adapters: [ "nimbus-kubearmor", "nimbus-netpol", "nimbus-kyverno", "nimbus-k8tls" ] | |
name: Build and push ${{ matrix.adapters }} adapter's image | |
uses: ./.github/workflows/release-image.yaml | |
with: | |
WORKING_DIRECTORY: ./pkg/adapter/${{ matrix.adapters }} | |
NAME: ${{ matrix.adapters }} | |
secrets: inherit |