From 333e94eedfcd929c0ba48574a158914825e50027 Mon Sep 17 00:00:00 2001 From: Luciano Giacchetta Date: Tue, 10 Mar 2026 17:51:08 -0300 Subject: [PATCH] fix: only commit on main --- .gitea/workflows/update-traefik-version.yml | 23 ++++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/update-traefik-version.yml b/.gitea/workflows/update-traefik-version.yml index 8b13654..f256576 100644 --- a/.gitea/workflows/update-traefik-version.yml +++ b/.gitea/workflows/update-traefik-version.yml @@ -6,6 +6,9 @@ on: schedule: - cron: '0 6 * * 1' # Every Monday at 06:00 UTC workflow_dispatch: + pull_request: + branches: + - main jobs: update-version: @@ -46,13 +49,13 @@ jobs: working-directory: ansible_role_proxy run: molecule test - # - name: Commit and push - # if: steps.check.outputs.needs_update == 'true' - # working-directory: ansible_role_proxy - # run: | - # git config user.name "giabot" - # git config user.email "bot@mail.gianet.us" - # git remote set-url origin "https://giabot:${{ secrets.GITEA_TOKEN }}@gianet.us/engineering/ansible_role_reverse.git" - # git add defaults/main.yml - # git commit -m "patch: update traefik_version to ${{ steps.check.outputs.latest }}" - # git push origin main + - name: Commit and push + if: steps.check.outputs.needs_update == 'true' && github.ref == 'refs/heads/main' + working-directory: ansible_role_proxy + run: | + git config user.name "giabot" + git config user.email "bot@mail.gianet.us" + git remote set-url origin "https://giabot:${{ secrets.GITEA_TOKEN }}@gianet.us/engineering/ansible_role_reverse.git" + git add defaults/main.yml + git commit -m "patch: update traefik_version to ${{ steps.check.outputs.latest }}" + git push origin main