diff --git a/.github/workflows/icon_update.yml b/.github/workflows/icon_update.yml index 74108ac41b..5e91aa572a 100644 --- a/.github/workflows/icon_update.yml +++ b/.github/workflows/icon_update.yml @@ -5,6 +5,9 @@ on: schedule: - cron: '0 3 * * *' +env: + GH_TOKEN: ${{ github.token }} + defaults: run: shell: pwsh @@ -30,9 +33,22 @@ jobs: run: dotnet run -c Release -- icons working-directory: ./mdresgen - - name: Commit changes + - name: Check for changes + id: check_for_changes + run: | + $hasChanges = $((git status --porcelain).Length -gt 0).ToString().ToLower() + "has_changes=$hasChanges" >> $env:GITHUB_OUTPUT + + - name: Open Pull Request + if: ${{ steps.check_for_changes.outputs.has_changes == 'true' }} run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git commit -m "[bot] Pack Icon update" --all - git push \ No newline at end of file + $commitMessage = @" + [bot] Pack Icon update + + + skip-checks: true + "@ + git commit -m "$commitMessage" --all + git push \ No newline at end of file diff --git a/.github/workflows/pr_verification.yml b/.github/workflows/pr_verification.yml index fb22a03098..a5e877c291 100644 --- a/.github/workflows/pr_verification.yml +++ b/.github/workflows/pr_verification.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + workflow_dispatch: defaults: run: