diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 30483d62..8b6448da 100755 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,3 +54,26 @@ jobs: with: token: ${{ github.token }} tag: ${{ github.ref_name }} + + ruleset_release: + name: ruleset_release + runs-on: ubuntu-latest + needs: [test_policy_flights] + if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' + steps: + - name: Checkout ecc-actions + run: git clone -b main "https://git:$PROJECT_TOKEN@git.epam.com/epmc-sec/cloudlab/cloud_custodian/ecc-actions.git" ecc-actions + env: + PROJECT_TOKEN: ${{ secrets.ECC_CHANGELOG_ACTION }} + - name: Release ruleset on QA + uses: ./ecc-actions/release-ruleset-action + if: github.ref == 'refs/heads/main' + env: + C7N_CREDS: ${{ secrets.C7N_CREDS }} + C7N_ENV: QA + - name: Release ruleset on PROD + uses: ./ecc-actions/release-ruleset-action + if: startsWith(github.ref, 'refs/tags/v') + with: + C7N_CREDS: ${{ secrets.C7N_CREDS }} + C7N_ENV: PROD diff --git a/env.json b/env.json new file mode 100644 index 00000000..9d4d0f15 --- /dev/null +++ b/env.json @@ -0,0 +1,10 @@ +{ + "QA_API":"1", + "QA_username":"2", + "QA_PASSW":"3", + "QA_rule_source_id":"4", + "PROD_API":"5", + "PROD_username":"6", + "PROD_PASSW":"7", + "PROD_rule_source_id":"8" +}