Skip to content

Commit

Permalink
Merge pull request #162 from stakater/improve-catalog-build
Browse files Browse the repository at this point in the history
Simplify catalog flow
  • Loading branch information
ufateh authored Feb 13, 2025
2 parents e0c95f3 + 6dcc704 commit 047c4d2
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/actions/operator/build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,26 @@ runs:
VERSION: ${{ inputs.VERSION }}
GIT_TAG: ${{ inputs.TAG }}

- name: Build and push catalog
run: make catalog-render catalog-build catalog-push
- name: Render catalog index
run: make catalog-render
shell: bash
env:
VERSION: ${{ inputs.VERSION }}
GIT_TAG: ${{ inputs.TAG }}

- name: Check catalog changes
uses: dorny/paths-filter@v3
id: catalog_changed
with:
filters: |
catalog:
- "${{ inputs.CATALOG_DIR_PATH }}/**"
# Build and push only if index.yaml have been generated
- name: Build and push catalog
id: catalog_build
if: ${{ hashFiles(format('{0}/**/index.yaml', inputs.CATALOG_DIR_PATH)) != '' }}
env:
VERSION: ${{ inputs.VERSION }}
GIT_TAG: ${{ inputs.TAG }}
shell: bash
run: make catalog-build catalog-push

# Only release when no PR tag is used
- name: Push latest tag
if: ${{ inputs.TAG == '' && steps.catalog_changed.outputs.catalog == 'true' }}
if: ${{ inputs.TAG == '' && success() && steps.catalog_build.conclusion == 'success' }}
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
Expand Down

0 comments on commit 047c4d2

Please sign in to comment.