Update CI from cookiecutter #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Update CI from cookiecutter" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 0 * * 0" | |
defaults: | |
run: | |
working-directory: "pulp-cli" | |
jobs: | |
update-ci: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v5" | |
with: | |
repository: "pulp/pulp-cli" | |
path: "pulp-cli" | |
- uses: "actions/checkout@v5" | |
with: | |
token: "${{ secrets.RELEASE_TOKEN }}" | |
path: "pulp-cli" | |
- name: "Set up Python" | |
uses: "actions/setup-python@v6" | |
with: | |
python-version: "3.13" | |
- name: "Setup git" | |
run: | | |
git config user.name pulpbot | |
git config user.email pulp-infra@redhat.com | |
- name: "Install python dependencies" | |
run: | | |
pip install cookiecutter tomlkit | |
- name: "Apply cookiecutter templates" | |
run: | | |
../pulp-cli/cookiecutter/apply_templates.py | |
if [ "$(git status --porcelain)" ] | |
then | |
git add . | |
git commit -m "Update cookiecutter" | |
fi | |
- name: "Create Pull Request" | |
uses: "peter-evans/create-pull-request@v7" | |
id: "create_pr" | |
with: | |
token: "${{ secrets.RELEASE_TOKEN }}" | |
title: "Update cookiecutter" | |
body: "" | |
branch: "update_cookiecutter" | |
delete-branch: true | |
path: "pulp-cli" | |
- name: "Mark PR automerge" | |
run: | | |
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}" | |
if: "steps.create_pr.outputs.pull-request-number" | |
env: | |
GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" | |
continue-on-error: true | |
... |