Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(update-example-gallery): resolve create-pr failure issue #6104

Merged
Merged
15 changes: 12 additions & 3 deletions .github/workflows/update-example-gallery.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Update example gallery # Updates examples twice a month
name: Update example gallery # Updates examples once a month

on:
workflow_dispatch:
schedule:
- cron: '0 4 8,22 * *' # Updates will happen every 8th/22nd of the month
- cron: '0 0 15 * *' # At 12:00 AM, on day 15 of the month

jobs:
check_gallery:
Expand Down Expand Up @@ -42,8 +42,17 @@ jobs:
exit 0
fi

- name: Commit the changes
if: failure() && steps.up_to_date.outcome == 'failure'
id: commit_chagnes
run: |
makafsal marked this conversation as resolved.
Show resolved Hide resolved
git config --global user.email ${{ secrets.CARBON_BOT_EMAIL }}
git config --global user.name ${{ secrets.CARBON_BOT_NAME }}
git add .
git commit -m "chore: update examples gallery"

makafsal marked this conversation as resolved.
Show resolved Hide resolved
- name: Create pull request
if: steps.up_to_date.outcome == 'failure'
if: failure() && steps.up_to_date.outcome == 'failure'
id: create-pr
uses: peter-evans/create-pull-request@v4
with:
Expand Down
Loading