From ebcf1d2ecac66239a3d3603acf6f6ee3dfd9f4fd Mon Sep 17 00:00:00 2001 From: Jamie MacDonald Date: Fri, 26 Jul 2024 14:28:18 +0100 Subject: [PATCH 1/4] Fetch supported versions from CMS --- .github/workflows/security-patching.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/security-patching.yml b/.github/workflows/security-patching.yml index afe96d62d..2720bffb1 100644 --- a/.github/workflows/security-patching.yml +++ b/.github/workflows/security-patching.yml @@ -31,13 +31,21 @@ jobs: with: python-version: '3.9' + - name: Run action to get records + uses: RasaHQ/get-release-records-from-datocms-gha@main + id: get_branches + with: + dato-cms-api-key: ${{ secrets.DATO_CMS_API_KEY }} + product-name: Rasa Pro + status: active + - name: Fetch all tags run: git fetch --tags - name: Run Python script id: tags run: | - python scripts/get_tags_from_branch.py '["3.3.x","3.4.x","3.5.x","3.6.x","3.7.x","3.8.x"]' '3.3.x' + python scripts/get_tags_from_branch.py '${{ steps.get_branches.outputs.records }}' '3.7.x' - name: Show tags run: | @@ -84,13 +92,10 @@ jobs: run: | docker build . -t ${{env.RELEASE_REGISTRY_SDK}}/rasa-sdk:${{ matrix.supported_versions }}-latest --build-arg VERSION_NUMBER=${{ matrix.supported_versions }} -f Dockerfile.patch - - name: Fail pushing the patch if the build is not a success - if: steps.build.outcome == 'failure' - run: exit 1 - # Push patched images to the release registry with patched tag. - name: Push image to release registry id: push + continue-on-error: true run: | docker push ${{env.RELEASE_REGISTRY_SDK}}/rasa-sdk:${{ matrix.supported_versions }}-latest From 02a262d9e3229400f844e80c986c989d884cc43f Mon Sep 17 00:00:00 2001 From: Jamie MacDonald Date: Fri, 26 Jul 2024 14:47:16 +0100 Subject: [PATCH 2/4] Correctly set supported branches --- .github/workflows/security-patching.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/security-patching.yml b/.github/workflows/security-patching.yml index 2720bffb1..c822aad6f 100644 --- a/.github/workflows/security-patching.yml +++ b/.github/workflows/security-patching.yml @@ -31,21 +31,13 @@ jobs: with: python-version: '3.9' - - name: Run action to get records - uses: RasaHQ/get-release-records-from-datocms-gha@main - id: get_branches - with: - dato-cms-api-key: ${{ secrets.DATO_CMS_API_KEY }} - product-name: Rasa Pro - status: active - - name: Fetch all tags run: git fetch --tags - name: Run Python script id: tags run: | - python scripts/get_tags_from_branch.py '${{ steps.get_branches.outputs.records }}' '3.7.x' + python scripts/get_tags_from_branch.py '["3.7.x","3.8.x", "3.9.x"]' '3.3.x' - name: Show tags run: | From d854035896b22b8e3e17f04947553abbb3342ca3 Mon Sep 17 00:00:00 2001 From: Jamie MacDonald Date: Fri, 26 Jul 2024 14:57:50 +0100 Subject: [PATCH 3/4] Clone action for use --- .github/workflows/security-patching.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/security-patching.yml b/.github/workflows/security-patching.yml index c822aad6f..54d7ec1bc 100644 --- a/.github/workflows/security-patching.yml +++ b/.github/workflows/security-patching.yml @@ -31,13 +31,29 @@ jobs: with: python-version: '3.9' + - name: Checkout action repository to get records + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + with: + repository: RasaHQ/get-release-records-from-datocms-gha + ref: main + token: ${{ secrets.CLONE_CMS_CHECKER }} + path: .github/get-release-records-from-datocms-gha + + - name: Run action to get records + uses: .github/get-release-records-from-datocms-gha + id: get_branches + with: + dato-cms-api-key: ${{ secrets.DATO_CMS_API_KEY }} + product-name: Rasa Pro + status: active + - name: Fetch all tags run: git fetch --tags - name: Run Python script id: tags run: | - python scripts/get_tags_from_branch.py '["3.7.x","3.8.x", "3.9.x"]' '3.3.x' + python scripts/get_tags_from_branch.py '${{ steps.get_branches.outputs.records }}' '3.7.x' - name: Show tags run: | From 619a0d7efbd2a7a056d84a10f2336fac06ef9364 Mon Sep 17 00:00:00 2001 From: Jamie MacDonald Date: Fri, 26 Jul 2024 14:59:19 +0100 Subject: [PATCH 4/4] Update action path --- .github/workflows/security-patching.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/security-patching.yml b/.github/workflows/security-patching.yml index 54d7ec1bc..f86b364a0 100644 --- a/.github/workflows/security-patching.yml +++ b/.github/workflows/security-patching.yml @@ -40,7 +40,7 @@ jobs: path: .github/get-release-records-from-datocms-gha - name: Run action to get records - uses: .github/get-release-records-from-datocms-gha + uses: ./.github/get-release-records-from-datocms-gha id: get_branches with: dato-cms-api-key: ${{ secrets.DATO_CMS_API_KEY }}