Skip to content

test

test #33

# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus
name: Latest release
on:
push:
branches:
- main
- "v*"
- fix-ci
create:
branches:
- "v*"
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: 3
outputs:
nimbus: ${{ steps.filter.outputs.nimbus}}
adapters: ${{ steps.filter.outputs.adapters }}
steps:
- uses: actions/checkout@v3
- uses: dorny/[email protected]
id: filter
with:
filters: |
nimbus:
- 'cmd/**'
- 'internal/**'
- 'pkg/processor/**'
adapters:
- 'pkg/adapter/**'
release-nimbus-image:
needs: files-changed
if: ${{ needs.files-changed.outputs.nimbus == 'true' }}
# if: github.repository == '5GSEC/nimbus'
name: Build and push nimbus image
uses: ./.github/workflows/release-image.yaml
with:
WORKING_DIRECTORY: .
secrets: inherit
release-adapters-image:
needs: files-changed
if: ${{ needs.files-changed.outputs.adapters == 'true' }}
# if: github.repository == '5GSEC/nimbus'
strategy:
matrix:
adapters: [ "nimbus-kubearmor", "nimbus-netpol", "nimbus-kyverno" ]
name: Build and push ${{ matrix.adapters }} adapter's image
uses: ./.github/workflows/release-image.yaml
with:
WORKING_DIRECTORY: ./pkg/adapter/${{ matrix.adapters }}
secrets: inherit