Skip to content

Commit

Permalink
CI: commit directly to repo and create/update issue on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
theofficialgman committed Jan 27, 2024
1 parent 69385da commit 0b3c623
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
12 changes: 12 additions & 0 deletions .github/update_apps_issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: 'CI: Update App Versions Failures'
---
[badge-error]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/error.svg?raw=true 'Error'
[badge-warning]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/warning.svg?raw=true 'Warning'
[badge-issue]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/issue.svg?raw=true 'Issue'
[badge-check]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/check.svg?raw=true 'Check'
[badge-info]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/info.svg?raw=true 'Info'
Workflow run: https://github.com/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}

{{ env.FAILED_APPS }}
{{ env.ALL_FAILED_APPS_ERROR_STRING }}
38 changes: 17 additions & 21 deletions .github/workflows/update_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,28 +368,24 @@ jobs:
echo "$ALL_UPDATED_APPS" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
- name: Create Commit and Push
uses: stefanzweifel/git-auto-commit-action@v5
with:
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit-message: |
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit_message: |
Update App Versions, run by GitHub Actions - Apps updated:
${{ env.ALL_UPDATED_APPS }}
branch: "auto-app-updates-NOT-FOR-USERS"
title: "[AUTO] Update App Versions"
body: |
[badge-error]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/error.svg?raw=true 'Error'
[badge-warning]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/warning.svg?raw=true 'Warning'
[badge-issue]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/issue.svg?raw=true 'Issue'
[badge-check]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/check.svg?raw=true 'Check'
[badge-info]: https://github.com/Pi-Apps-Coders/GitHub-Markdown/blob/main/blockquotes/badge/dark-theme/info.svg?raw=true 'Info'
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action.
Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
For the cleanest looking merge remember to use the "Rebase and merge" option.
Apps updated:
```
${{ env.ALL_UPDATED_APPS }}
```
${{needs.get-latest-app-versions.outputs.FAILED_APPS}}
${{ env.ALL_FAILED_APPS_ERROR_STRING }}
- name: Create or Update issue
if: ${{ needs.get-latest-app-versions.outputs.FAILED_APPS != '' || env.ALL_FAILED_APPS_ERROR_STRING != '' }}
uses: JasonEtco/create-an-issue@v2
env:
FAILED_APPS: ${{needs.get-latest-app-versions.outputs.FAILED_APPS}}
ALL_FAILED_APPS_ERROR_STRING: ${{ env.ALL_FAILED_APPS_ERROR_STRING }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ID: ${{ github.run_id }}
with:
update_existing: true
search_existing: all
filename: .github/update_apps_issue_template.md

0 comments on commit 0b3c623

Please sign in to comment.