diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2da4fc8d0a..d9cda1ae76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -535,7 +535,7 @@ jobs: - name: Add a GitHub comment if release has failed uses: actions/github-script@v7 - if: ${{ failure() && env.GITHUB_REPOSITORY != 'openshift-helm-charts/sandbox' }} + if: ${{ failure() && github.repository != 'openshift-helm-charts/sandbox' }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -555,14 +555,14 @@ jobs: # This can be removed once the metrics execution is restructured to have access to the PR # comment, or pulled out of the release job entirely. - name: Retrieve PR comment for metrics - if: ${{ always() && needs.setup.outputs.run_build == 'true' && env.GITHUB_REPOSITORY != 'openshift-helm-charts/sandbox' }} + if: ${{ always() && needs.setup.outputs.run_build == 'true' && github.repository != 'openshift-helm-charts/sandbox' }} run: | mkdir -p $(dirname ${{ needs.chart-verifier.outputs.message_file }}) echo ${{ needs.chart-verifier.outputs.message_text_base64 }} | base64 -d | tee ${{ needs.chart-verifier.outputs.message_file }} - name: Add metrics id: add_metrics - if: ${{ always() && needs.setup.outputs.run_build == 'true' && env.GITHUB_REPOSITORY != 'openshift-helm-charts/sandbox' }} + if: ${{ always() && needs.setup.outputs.run_build == 'true' && github.repository != 'openshift-helm-charts/sandbox' }} continue-on-error: true env: BOT_TOKEN: ${{ secrets.BOT_TOKEN }} diff --git a/scripts/src/packagemapping/generatelocks.py b/scripts/src/packagemapping/generatelocks.py index 642eaf18e4..3bdabc0bc3 100644 --- a/scripts/src/packagemapping/generatelocks.py +++ b/scripts/src/packagemapping/generatelocks.py @@ -72,11 +72,12 @@ def main(): ) return 20 - owners_content_loaded, owners_content = owners_file.get_owner_data_from_file( - filename - ) - if not owners_content_loaded: - logError(f"Failed to load OWNERS file content. filename: {filename}") + try: + owners_content = owners_file.get_owner_data_from_file(filename) + except owners_file.OwnersFileError as of_err: + logError( + f"Failed to load OWNERS file content. filename: {filename} with error {of_err}" + ) return 30 owners_value_chart_name = owners_file.get_chart(owners_content)