Stable release #8
Workflow file for this run
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 2024 Authors of SentryFlow | |
name: Stable release | |
on: | |
create: | |
tags: | |
- "v*" | |
permissions: read-all | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
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' }} | |
name: Build and push sentryflow image | |
uses: ./.github/workflows/release-image.yaml | |
with: | |
WORKING_DIRECTORY: ./sentryflow | |
NAME: sentryflow | |
secrets: inherit | |
release-envoy-filter-image: | |
needs: [ files-changed ] | |
if: ${{ github.repository == '5GSEC/sentryflow' && needs.files-changed.outputs.envoyfilter == 'true' }} | |
name: Build and push envoyfilter's image | |
uses: ./.github/workflows/release-image.yaml | |
with: | |
WORKING_DIRECTORY: filter/envoy/envoy-wasm-filters | |
NAME: sentryflow-httpfilter | |
secrets: inherit | |
update-image-tags-in-helm-charts: | |
if: github.repository == '5GSEC/sentryflow' | |
needs: [ release-sentryflow-image ] | |
permissions: | |
pull-requests: write | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Get tag | |
id: tag | |
run: | | |
if [ ${{ github.ref }} == "refs/heads/main" ]; then | |
echo "tag=latest" >> $GITHUB_OUTPUT | |
else | |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
fi | |
- name: Update images tag | |
run: | | |
./hack/update-image-tag.sh ${{ steps.tag.outputs.tag }} | |
- name: Create PR to update images tag in Helm charts | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
branch: update-helm-${{ steps.tag.outputs.tag }} | |
commit-message: "[skip ci] Update Helm Chart To ${{ steps.tag.outputs.tag }}" | |
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" | |
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" | |
title: "[skip ci] Update Helm Chart To ${{ steps.tag.outputs.tag }}" | |
base: main | |
signoff: true | |
delete-branch: true |