Skip to content

Commit

Permalink
Lint templates before sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Sep 5, 2024
1 parent 7c83c64 commit 999d629
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:

jobs:
lint:
name: Lint Jinja Templates
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4

- name: Run j2lint
uses: ansible-actions/j2lint-action@v0.0.1
with:
target: "*.j2"

sync:
name: Netbox Sync
runs-on: ubuntu-latest
if: github.ref_name == 'main'
needs: lint
env:
DATA_SOURCE_ID: "1"
steps:
- run: |
curl https://netbox.freifunk-duesseldorf.de/api/core/data-sources/${DATA_SOURCE_ID}/sync/ \
-X POST --fail \
-H "Authorization: Token ${{ secrets.NETBOX_API_TOKEN }}"
16 changes: 0 additions & 16 deletions .github/workflows/sync.yaml

This file was deleted.

0 comments on commit 999d629

Please sign in to comment.