Skip to content

Merge pull request #164 from armosec/fixworkflowsapi #87

Merge pull request #164 from armosec/fixworkflowsapi

Merge pull request #164 from armosec/fixworkflowsapi #87

Workflow file for this run

name: 01-pr-merged
on:
push:
branches:
- master
paths-ignore:
- '**README.md'
- '**.yaml'
- '**.yml'
- '**.md'
- '**.sh'
- 'docs/*'
- '.github/*'
workflow_dispatch:
inputs:
TAG_BUMP_TYPE:
description: 'TAG_BUMP_TYPE'
options:
- patch
- minor
- major
type: choice
default: patch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
cancel-in-progress: true
env:
GITHUB_REPOSITORY: ${{ github.repository }}
PR_OPENER: ${{ github.actor }}
DOCKER_IMAGE_PATH: quay.io/armosec/kubescape-config-service
DEV_VALUES_DIRS: kubernetes-deployment/Helm/cyberarmor-be-apps/values/eu-dev-3
STAGING_VALUES_DIRS: kubernetes-deployment/Helm/cyberarmor-be-apps/values/eu-stage-2
PRODUCTION_VALUES_DIRS: kubernetes-deployment/Helm/cyberarmor-be-apps/values/eu-prod-1,kubernetes-deployment/event-sourcing-chart/release-process-ci-values.yaml
STAGING_ARGO_APPS: kubescape-config-service-stage
PRODUCTION_ARGO_APPS: kubescape-config-service-prod
TESTS_GROUPS: MAPPED_REPO_TESTS
CD_WORKFLOW_NAME: e-cd-release-process
# ---------------------------------- 01 Call config-service CD Process------------------------------------- #
jobs:
trigger-cd-process:
runs-on: ubuntu-latest
steps:
- name: Checkout shared-workflows Repository
uses: actions/checkout@v3
with:
repository: armosec/shared-workflows
submodules: 'true'
token: ${{ secrets.ARMOSEC_GITHUB_ACCESS_TOKEN }}
path: shared-workflows
ref: main
- name: Set PR Opener
run: |
if [ -z "${{ github.event.pull_request.user.login }}" ]; then
echo "PR_OPENER=${{ github.actor }}" >> $GITHUB_ENV
else
echo "PR_OPENER=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
fi
- name: Wait for Queued CD Workflows to Finish
env:
GITHUB_TOKEN: ${{ secrets.ARMOSEC_GITHUB_ACCESS_TOKEN }}
run: |
chmod +x shared-workflows/.github/scripts/04.wait_for_queued_workflows.sh
shared-workflows/.github/scripts/04.wait_for_queued_workflows.sh "${{ env.CD_WORKFLOW_NAME }}"
- name: Trigger CD Process
uses: benc-uk/[email protected]
with:
workflow: e-cd-release-process.yaml
repo: armosec/shared-workflows
ref: main
token: ${{ secrets.ARMOSEC_GITHUB_ACCESS_TOKEN }}
inputs: '{"GITHUB_REPOSITORY":"${{ env.GITHUB_REPOSITORY }}","PR_OPENER":"${{ env.PR_OPENER }}","DOCKER_IMAGE_PATH":"${{ env.DOCKER_IMAGE_PATH }}","DEV_VALUES_DIRS":"${{ env.DEV_VALUES_DIRS }}","STAGING_VALUES_DIRS":"${{ env.STAGING_VALUES_DIRS }}","PRODUCTION_VALUES_DIRS":"${{ env.PRODUCTION_VALUES_DIRS }}","STAGING_ARGO_APPS":"${{ env.STAGING_ARGO_APPS }}","PRODUCTION_ARGO_APPS":"${{ env.PRODUCTION_ARGO_APPS }}","TESTS_GROUPS":"${{ env.TESTS_GROUPS }}"}'