Skip to content

Commit 003fb1c

Browse files
committed
cookiecutter(ci): Use raw to avoid Jinja parsing error
1 parent e134e8a commit 003fb1c

File tree

2 files changed

+7
-1
lines changed
  • cookiecutter-django/{{cookiecutter.project_slug}}/.github/workflows
  • cookiecutter-pypackage/{{cookiecutter.repository_name}}/.github/workflows

2 files changed

+7
-1
lines changed

cookiecutter-django/{{cookiecutter.project_slug}}/.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: CI
22
on: [push, pull_request]
33
jobs:
44
build:
5+
{%- raw %}
56
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
7+
{%- endraw %}
68
runs-on: ubuntu-latest
79
steps:
810
- uses: actions/checkout@v4
@@ -18,7 +20,9 @@ jobs:
1820
- name: Run checks and tests
1921
env:
2022
PYTHONWARNINGS: error
21-
DATABASE_URL: postgresql://postgres:postgres@localhost:${{ "{{" }} job.services.postgres.ports[5432] }}/postgres
23+
{%- raw %}
24+
DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
25+
{%- endraw %}
2226
shell: bash
2327
run: |
2428
./manage.py migrate

cookiecutter-pypackage/{{cookiecutter.repository_name}}/.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: CI
22
on: [push, pull_request]
33
jobs:
44
build:
5+
{%- raw %}
56
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
7+
{%- endraw %}
68
{%- if cookiecutter.os_independent == "y" %}
79
{%- raw %}
810
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)