Skip to content

Commit

Permalink
CI: Fix stable release job
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag Rajawat <[email protected]>
  • Loading branch information
anurag-rajawat committed Dec 11, 2024
1 parent e6be548 commit 513761d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
26 changes: 3 additions & 23 deletions .github/workflows/stable-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,8 @@ concurrency:
cancel-in-progress: true

jobs:
files-changed:
name: Find out which files were changed
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
sentryflow: ${{ steps.filter.outputs.sentryflow}}
envoyfilter: ${{ steps.filter.outputs.envoyfilter}}
steps:
- uses: actions/checkout@v4
- uses: dorny/[email protected]
id: filter
with:
filters: |
sentryflow:
- 'sentryflow/**'
envoyfilter:
- 'filter/envoy/envoy-wasm-filters/**'
release-sentryflow-image:
needs: [ files-changed ]
if: ${{ github.repository == '5GSEC/sentryflow' && needs.files-changed.outputs.sentryflow == 'true' }}
if: ${{ github.repository == '5GSEC/sentryflow' }}
name: Build and push sentryflow image
uses: ./.github/workflows/release-image.yaml
with:
Expand All @@ -44,8 +25,7 @@ jobs:
secrets: inherit

release-envoy-filter-image:
needs: [ files-changed ]
if: ${{ github.repository == '5GSEC/sentryflow' && needs.files-changed.outputs.envoyfilter == 'true' }}
if: ${{ github.repository == '5GSEC/sentryflow' }}
name: Build and push envoyfilter's image
uses: ./.github/workflows/release-image.yaml
with:
Expand All @@ -54,7 +34,7 @@ jobs:
secrets: inherit

update-image-tags-in-helm-charts:
if: github.repository == '5GSEC/sentryflow'
if: ${{ github.repository == '5GSEC/sentryflow' }}
needs: [ release-sentryflow-image ]
permissions:
pull-requests: write
Expand Down
14 changes: 14 additions & 0 deletions hack/update-image-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Authors of SentryFlow

if ! command -v yq > /dev/null; then
echo "Installing yq..."
go install github.com/mikefarah/yq/v4@latest
fi

TAG=$1
DEPLOYMENT_ROOT_DIR="deployments/sentryflow"

echo "Updating tag to ${TAG}"
yq -i ".image.tag = \"$TAG\"" "${DEPLOYMENT_ROOT_DIR}/values.yaml"

0 comments on commit 513761d

Please sign in to comment.