From 06d99c35cb40f951f704524760254973c997e7a0 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Tue, 14 Apr 2026 12:04:36 +0200 Subject: [PATCH 1/2] fix: separate generate and cleanup actions --- .github/workflows/cleanup.yml | 41 ++++++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 2 +- .github/workflows/generate.yml | 38 +------------------------------ .github/workflows/test.yml | 2 +- 4 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 00000000..ca790085 --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,41 @@ +name: Cleanup catalog + +on: + schedule: + - cron: 0 7 1 * * + +jobs: + cleanup-catalog: + runs-on: ubuntu-latest + strategy: + matrix: + offset: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90] + max-parallel: 1 + steps: + - uses: actions/checkout@v6 + + - uses: prefix-dev/setup-pixi@v0 + with: + cache: true + + - name: Pull latest changes + run: | + git pull --rebase origin ${{ github.ref }} + + - name: cleanup-catalog + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OFFSET: ${{ matrix.offset }} + run: pixi run cleanup-catalog + + - name: Commit files + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -m "Add changes" -a || echo "No changes to commit" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 21eb24ca..ea6dc884 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,7 +6,7 @@ on: types: - completed push: - branches: [main, dev] + branches: [main] defaults: run: diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 9c52ebc4..060e50ac 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -4,7 +4,7 @@ on: schedule: - cron: 0 5 * * 1 push: - branches: [main, dev] + branches: [main] jobs: generate-catalog: @@ -42,39 +42,3 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} - - cleanup-catalog: - runs-on: ubuntu-latest - needs: generate-catalog - strategy: - matrix: - offset: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90] - max-parallel: 1 - steps: - - uses: actions/checkout@v6 - - - uses: prefix-dev/setup-pixi@v0 - with: - cache: true - - - name: Pull latest changes - run: | - git pull --rebase origin ${{ github.ref }} - - - name: cleanup-catalog - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OFFSET: ${{ matrix.offset }} - run: pixi run cleanup-catalog - - - name: Commit files - run: | - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git commit -m "Add changes" -a || echo "No changes to commit" - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 397b532c..b2f9e713 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: pull_request: - branches: [main, dev] + branches: [main] jobs: generate-catalog: From b44e193eb1c6e41d93fa72cc189059651855cec4 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Tue, 14 Apr 2026 14:08:36 +0200 Subject: [PATCH 2/2] fix: review comments --- .github/workflows/cleanup.yml | 2 +- .github/workflows/generate.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index ca790085..72280b98 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -35,7 +35,7 @@ jobs: git commit -m "Add changes" -a || echo "No changes to commit" - name: Push changes - uses: ad-m/github-push-action@master + uses: ad-m/github-push-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 060e50ac..62244c0c 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -8,6 +8,7 @@ on: jobs: generate-catalog: + if: github.event_name == 'schedule' || github.actor != 'github-actions[bot]' runs-on: ubuntu-latest strategy: matrix: @@ -38,7 +39,7 @@ jobs: git commit -m "Add changes" -a || echo "No changes to commit" - name: Push changes - uses: ad-m/github-push-action@master + uses: ad-m/github-push-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }}