-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Luca Guerra <[email protected]>
- Loading branch information
1 parent
f25c057
commit 12d9714
Showing
3 changed files
with
55 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,45 @@ name: Release Packages and Docker images | |
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+' # final release | ||
- '[0-9]+.[0-9]+.[0-9]+-*' # prerelease/RC | ||
|
||
# Checks if any concurrent jobs is running for release CI and eventually cancel it. | ||
concurrency: | ||
group: ci-release | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release-settings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get latest release | ||
uses: rez0n/[email protected] | ||
id: latest_release | ||
env: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} | ||
type: "stable" | ||
|
||
- name: Get settings for this release | ||
id: get_settings | ||
shell: python | ||
run: | | ||
import os | ||
is_prerelease = '-' in '${{ github.ref_name }}' | ||
# Safeguard: you need to both set "latest" in GH and not have suffixes to overwrite latest | ||
is_latest = '${{ steps.latest_release.outputs.release }}' == '${{ github.ref_name }}' and not is_prerelease | ||
bucket_suffix = '-dev' if is_prerelease else '' | ||
with open(os.environ['GITHUB_OUTPUT'], 'a') as ofp: | ||
print(f'is_latest={is_latest}'.lower(), file=ofp) | ||
print(f'bucket_suffix={bucket_suffix}', file=ofp) | ||
outputs: | ||
is_latest: ${{ steps.get_settings.outputs.is_latest }} | ||
bucket_suffix: ${{ steps.get_settings.outputs.bucket_suffix }} | ||
|
||
build-packages: | ||
uses: falcosecurity/falco/.github/workflows/reusable_build_packages.yaml@master | ||
with: | ||
|
@@ -26,6 +57,7 @@ jobs: | |
needs: [build-packages, build-packages-arm64] | ||
uses: falcosecurity/falco/.github/workflows/reusable_publish_packages.yaml@master | ||
with: | ||
bucket_suffix: ${{ steps.get_settings.outputs.bucket_suffix }} | ||
version: ${{ needs.build-packages.outputs.version }} | ||
secrets: inherit | ||
|
||
|
@@ -35,6 +67,8 @@ jobs: | |
uses: falcosecurity/falco/.github/workflows/reusable_build_docker.yaml@master | ||
with: | ||
arch: x86_64 | ||
is_latest: ${{ needs.release-settings.outputs.is_latest == 'true' }} | ||
bucket_suffix: ${{ steps.get_settings.outputs.bucket_suffix }} | ||
version: ${{ needs.build-packages.outputs.version }} | ||
secrets: inherit | ||
|
||
|
@@ -43,11 +77,14 @@ jobs: | |
uses: falcosecurity/falco/.github/workflows/reusable_build_docker.yaml@master | ||
with: | ||
arch: aarch64 | ||
is_latest: ${{ needs.release-settings.outputs.is_latest == 'true' }} | ||
bucket_suffix: ${{ steps.get_settings.outputs.bucket_suffix }} | ||
version: ${{ needs.build-packages.outputs.version }} | ||
secrets: inherit | ||
|
||
publish-docker: | ||
needs: [build-docker, build-docker-arm64] | ||
uses: falcosecurity/falco/.github/workflows/reusable_publish_docker.yaml@master | ||
secrets: inherit | ||
|
||
with: | ||
is_latest: ${{ needs.release-settings.outputs.is_latest == 'true' }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,31 +70,31 @@ jobs: | |
push: true | ||
|
||
- name: Create and push no-driver latest manifest | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: falcosecurity/falco-no-driver:latest | ||
images: falcosecurity/falco-no-driver:aarch64-latest,falcosecurity/falco-no-driver:x86_64-latest | ||
push: true | ||
|
||
- name: Create and push slim latest manifest | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: falcosecurity/falco:latest-slim | ||
images: falcosecurity/falco:aarch64-latest-slim,falcosecurity/falco:x86_64-latest-slim | ||
push: true | ||
|
||
- name: Create and push no-driver latest manifest for ecr | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: public.ecr.aws/falcosecurity/falco-no-driver:latest | ||
images: public.ecr.aws/falcosecurity/falco-no-driver:aarch64-latest,public.ecr.aws/falcosecurity/falco-no-driver:x86_64-latest | ||
push: true | ||
|
||
- name: Create and push slim latest manifest for ecr | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: public.ecr.aws/falcosecurity/falco:latest-slim | ||
|
@@ -116,15 +116,15 @@ jobs: | |
push: true | ||
|
||
- name: Create and push falco latest manifest | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: falcosecurity/falco:latest | ||
images: falcosecurity/falco:aarch64-latest,falcosecurity/falco:x86_64-latest | ||
push: true | ||
|
||
- name: Create and push falco latest manifest for ecr | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: public.ecr.aws/falcosecurity/falco:latest | ||
|
@@ -146,15 +146,15 @@ jobs: | |
push: true | ||
|
||
- name: Create and push falco-driver-loader latest manifest | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: falcosecurity/falco-driver-loader:latest | ||
images: falcosecurity/falco-driver-loader:aarch64-latest,falcosecurity/falco-driver-loader:x86_64-latest | ||
push: true | ||
|
||
- name: Create and push falco-driver-loader latest manifest for ecr | ||
if: ${{ github.ref_name != 'master' }} | ||
if: ${{ inputs.is_latest }} | ||
uses: Noelware/[email protected] | ||
with: | ||
inputs: public.ecr.aws/falcosecurity/falco-driver-loader:latest | ||
|