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

Cruft/update #67

Closed
wants to merge 14 commits into from
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/kjaymiller/cookiecutter-relecloud",
"commit": "f77ad8b302ac9c3d851f82c7b875a200c8e876e2",
"commit": "9a4147023e7d1ab60accd7eca6ecbc8e2de38afb",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/cruft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
python-version: "3.10"

- name: Install Cruft
run: pip3 install cruft
run: pip3 install -r requirements-dev.in

- name: Check if update is available
continue-on-error: false
id: check
run: |
CHANGES=0
if [ -f .cruft.json ]; then
if ! cruft check; then
if ! cruft check --checkout="jm-on-stream"; then
CHANGES=1
fi
else
Expand All @@ -59,16 +59,12 @@ jobs:

- name: Create pull request
if: steps.check.outputs.has_changes == '1'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: ${{ matrix.add-paths }}
commit-message: ${{ matrix.commit-message }}
branch: ${{ matrix.branch }}
delete-branch: true
branch-suffix: timestamp
title: ${{ matrix.title }}
body: |
This is an autogenerated PR. ${{ matrix.body }}

[Cruft](https://cruft.github.io/cruft/) has detected updates from the Cookiecutter repository.
run: |
echo "::set-output name=branch::${{ matrix.branch }}"
echo "::set-output name=commit-message::${{ matrix.commit-message }}"
echo "::set-output name=title::${{ matrix.title }}"
echo "::set-output name=body::${{ matrix.body }}"
git checkout -b "${{ matrix.branch }}"
git add .
git commit -m "${{ matrix.commit-message }}"
git push origin "${{ matrix.branch }}"
Loading