Skip to content

Commit dc76477

Browse files
authored
feat: avoid sync-tags job when no updates are committed (#183)
1 parent 915f775 commit dc76477

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/scheduled-jobs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
if: github.repository == 'CustomResourceDefinition/catalog' || github.event_name == 'workflow_dispatch'
3030
permissions:
3131
contents: write
32+
outputs:
33+
updated: ${{ steps.committer.outputs.pushed }}
3234
steps:
3335
- uses: actions/checkout@v6
3436
with:
@@ -72,6 +74,7 @@ jobs:
7274
- uses: EndBug/add-and-commit@v9
7375
name: Publish changes
7476
if: github.repository == 'CustomResourceDefinition/catalog' && github.ref == 'refs/heads/main'
77+
id: committer
7578
with:
7679
add: |
7780
- schema
@@ -105,7 +108,7 @@ jobs:
105108
name: Synchronize tags with kubernetes
106109
runs-on: ubuntu-latest
107110
needs: update-schemas
108-
if: github.repository == 'CustomResourceDefinition/catalog' && github.ref == 'refs/heads/main'
111+
if: github.repository == 'CustomResourceDefinition/catalog' && github.ref == 'refs/heads/main' && needs.update-schemas.outputs.updated
109112
permissions:
110113
contents: write
111114
steps:

0 commit comments

Comments
 (0)