From 30d8f670604ec4d20f0282310e3d0c64bce56cba Mon Sep 17 00:00:00 2001 From: Pol Alvarez Date: Mon, 20 Jun 2022 13:58:07 +0200 Subject: [PATCH] pushing releases to new repo --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 13edbd2561..58607dd9fb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -333,6 +333,18 @@ jobs: user_email: ci@biomage.net user_name: Biomage CI/CD + - name: Push production/develop template to releases repo for deployment + if: (matrix.environment == 'production' && github.event_name == 'release' && github.event.action == 'released') || (matrix.environment == 'develop' && github.event_name == 'push') + uses: dmnemec/copy_file_to_another_repo_action@v1.0.4 + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source_file: ${{ steps.fill-metadata.outputs.deployment-name }}.yaml + destination_repo: ${{ github.repository_owner }}/releases + destination_folder: ${{ steps.fill-metadata.outputs.kubernetes-env }} + user_email: ci@biomage.net + user_name: Biomage CI/CD + - name: Change name of deployment file for staging deployment if: (github.event_name == 'pull_request' || github.event_name == 'push') && matrix.environment == 'staging' env: @@ -353,6 +365,18 @@ jobs: user_email: ci@biomage.net user_name: 'Biomage CI/CD' + - name: Push staging deployment template to releases + if: (github.event_name == 'pull_request' || github.event_name == 'push') && matrix.environment == 'staging' + uses: dmnemec/copy_file_to_another_repo_action@v1.0.4 + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source_file: ${{ steps.fill-metadata.outputs.ref-dashed }}.yaml + destination_repo: ${{ github.repository_owner }}/releases + destination_folder: staging-candidates/${{ steps.fill-metadata.outputs.deployment-name }} + user_email: ci@biomage.net + user_name: 'Biomage CI/CD' + - id: enable-admin-enforcement name: Re-enable admin enforcement uses: benjefferies/branch-protection-bot@1.0.7