Publish All Operators: Snapshot Release #19
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
name: Publish All Operators | |
run-name: ${{ format('Publish All Operators{0} {1} Release', ':', inputs.release_type) }} | |
on: | |
workflow_dispatch: | |
inputs: | |
release_type: | |
type: choice | |
description: 'The type of release' | |
options: | |
- Major | |
- Minor | |
- Patch | |
- Snapshot | |
jobs: | |
start: | |
name: Start Operator Build | |
runs-on: ubuntu-latest | |
outputs: | |
new_version: ${{ steps.version.outputs.new_version }} | |
steps: | |
- name: Show Context | |
run: | | |
printenv | |
echo "$GITHUB_CONTEXT" | |
shell: bash | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
- name: Check branch and release type | |
uses: IABTechLab/uid2-shared-actions/actions/[email protected] | |
with: | |
release_type: ${{ inputs.release_type }} | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Vulnerability Scan | |
uses: IABTechLab/uid2-shared-actions/actions/[email protected] | |
with: | |
publish_vulnerabilities: true | |
- name: Set version number | |
id: version | |
uses: IABTechLab/uid2-shared-actions/actions/[email protected] | |
with: | |
type: ${{ inputs.release_type }} | |
branch_name: ${{ github.ref }} | |
- name: Update pom.xml | |
run: | | |
current_version=$(grep -o '<version>.*</version>' pom.xml | head -1 | sed 's/<version>\(.*\)<\/version>/\1/') | |
new_version=${{ steps.version.outputs.new_version }} | |
sed -i "s/$current_version/$new_version/g" pom.xml | |
echo "Version number updated from $current_version to $new_version" | |
- name: Commit pom.xml and version.json | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'pom.xml version.json' | |
author_name: Release Workflow | |
author_email: [email protected] | |
message: 'Released ${{ inputs.release_type }} version: ${{ steps.version.outputs.new_version }}' | |
tag: v${{ steps.version.outputs.new_version }} | |
buildPublic: | |
name: Public Operator | |
needs: start | |
uses: ./.github/workflows/publish-public-operator-docker-image.yaml | |
with: | |
release_type: ${{ inputs.release_type }} | |
version_number_input: ${{ needs.start.outputs.new_version }} | |
#buildAWS: | |
# name: AWS Private Operator | |
# needs: start | |
# uses: ./.github/workflows/publish-aws-operator-AMI.yaml | |
# with: | |
# release_type: ${{ inputs.release_type }} | |
# version_number_input: ${{ needs.start.outputs.new_version }} | |
buildGCP: | |
name: GCP Private Operator | |
needs: start | |
uses: ./.github/workflows/publish-gcp-oidc-enclave-docker.yaml | |
with: | |
release_type: ${{ inputs.release_type }} | |
version_number_input: ${{ needs.start.outputs.new_version }} | |
buildAzure: | |
name: Azure Private Operator | |
needs: start | |
uses: ./.github/workflows/publish-azure-cc-enclave-docker.yaml | |
with: | |
release_type: ${{ inputs.release_type }} | |
version_number_input: ${{ needs.start.outputs.new_version }} | |
collectAllArtifacts: | |
name: Collect All Artifacts | |
runs-on: ubuntu-latest | |
needs: [buildPublic, buildGCP, buildAzure] | |
steps: | |
- name: Download Public Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: image_details | |
path: ./artifacts/public_operator | |
- name: Download GCP Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: gcp-oidc-deployment-files | |
path: ./artifacts/gcp_oidc_operator | |
- name: Download Azure Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: azure-cc-deployment-files | |
path: ./artifacts/azure_cc_operator | |
- name: Delete Public Artifacts | |
uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: | | |
image_details | |
gcp-oidc-deployment-files | |
azure-cc-deployment-files | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: operator_release | |
path: ./artifacts/ | |