Skip to content

chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.4 #700

chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.4

chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.4 #700

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Test cookiecutter-action
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get branch names
id: branch-name
uses: tj-actions/[email protected]
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-
restore-keys: |
${{ runner.os }}-pip-
- name: Install cookiecutter
run: |
pip install cookiecutter
- name: Run test
run: |
rm -rf test-project
cookiecutter --config-file=test-config.yml --no-input .
- name: Verify Changed files
uses: tj-actions/[email protected]
id: changed_files
if: steps.branch-name.outputs.is_default == 'true'
with:
files: |
test-project
- name: Perform action when test_directory changes
if: "steps.branch-name.outputs.is_default == 'true' && contains(steps.changed_files.outputs.changed_files, 'test-project')"
run: |
echo "test-project has uncommited changes."
exit 1
- name: Create Pull Request
if: steps.branch-name.outputs.is_default == 'true' && failure()
uses: peter-evans/create-pull-request@v6
with:
base: "main"
labels: "merge when passing"
title: "Updated test-project"
branch: "chore/update-test-project"
commit-message: "Updated test-project"
body: "Updated test-project"
token: ${{ secrets.PAT_TOKEN }}