Skip to content

fix: update dependency ruff to ^0.6.0 (#1069) #1036

fix: update dependency ruff to ^0.6.0 (#1069)

fix: update dependency ruff to ^0.6.0 (#1069) #1036

---
name: Initialize Repository
on:
push:
branches:
- main
permissions:
contents: write
issues: write
jobs:
setup:
if: ${{ ! contains(github.repository, 'template') }}
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
files.pythonhosted.org:443
github.com:443
pypi.org:443
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Setup labels for the repository
run: gh label clone inovintell/py-template --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update repository name
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 # tag=v2
with:
file: cookiecutter.json
field: repository
value: ${{ github.event.repository.name }}
- name: Update repository owner
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 # tag=v2
with:
file: cookiecutter.json
field: repository_owner
value: ${{ github.repository_owner }}
- name: Setup Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: 3.x
- name: Install cookiecutter
run: pip install cookiecutter
- name: Hack cookiecutter to work with GH Actions
id: hack
working-directory: ${{ github.workspace }}/../
run: |
rm ${{ github.event.repository.name }}/.github/workflows/initialization.yml
mv ${{ github.event.repository.name }}/cookiecutter.json ./
mv ${{ github.event.repository.name }} '{{cookiecutter.repository}}'
echo "working_directory=$(pwd)" >> $GITHUB_OUTPUT
- name: Create repo from template
working-directory: ${{ steps.hack.outputs.working_directory }}/../
run: >
cookiecutter --verbose --no-input
${{ github.event.repository.name }}
--output-dir ./${{ github.event.repository.name }}
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_message: 'fix: setup template repository [skip ci]'
add_options: --all
push_options: --force