ivanshamaev/de-agent-skills/github-actions-dataops

Claude Code and agent skill by ivanshamaev/de-agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when building or reviewing GitHub Actions CI/CD pipelines for data engineering — covering dbt slim CI (state:modified+, --defer, manifest.json), SQLFluff SQL linting with PR annotations, Airflow DAG integrity tests (pytest/DagBag), Great Expectations and Soda data quality gates, multi-stage Docker image builds for Spark/dbt/Airflow pushed to ghcr.io, secrets management with OIDC for AWS/GCP (no static keys), environment-scoped secrets, reusable workflows (workflow_call), matrix builds, composite actions, and full end-to-end dbt project CI/CD workflows.

Install

npx vskill@latest install ivanshamaev/de-agent-skills/github-actions-dataops

SKILL.md

The same SKILL.md was published earlier as ivanshamaev/de-agent-skills/github-actions-dataops.

GitHub Actions for DataOps / CI/CD

When to Use

Load this skill when the user needs to:

  • Build or review GitHub Actions workflows for dbt, Airflow, Spark, or other data tools
  • Set up slim CI for dbt (state:modified+, --defer, manifest.json artifact passing)
  • Lint SQL with SQLFluff and surface inline PR annotations
  • Validate Airflow DAGs in CI using pytest / DagBag checks
  • Run Great Expectations or Soda as a data quality gate in CI
  • Build and push Docker images for data tools to ghcr.io with layer caching
  • Manage secrets securely — OIDC for AWS/GCP, no static credentials
  • Create reusable workflows, matrix builds, and composite actions
  • Deploy dbt docs to GitHub Pages

Core Workflow Anatomy

yaml
# Minimal structure — every workflow follows this skeleton
name: <workflow-name>
on:
pull_request:
branches: [main]
paths: # only trigger when relevant files change
- 'dbt/**'
- '.github/workflows/**'
permissions:
contents: read # least-privilege default
id-token: write # required for OIDC token request
pull-requests: write # required for PR annotations / comments
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # cancel stale runs on new push
jobs:
my-job:
runs-on: ubuntu-24.04 # pin major version, not "latest"
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for state:modified comparisons

dbt CI/CD

Slim CI — state:modified+ with --defer

Slim CI runs only the models that changed (and their downstream dependents) by comparing the PR's manifest.json against the production one. --defer means unmodified upstream models are resolved from the production environment, so the CI database stays lean.

yaml
# .github/workflows/dbt-ci.yml
name: dbt CI
on:
pull_request:
branches: [main]
paths:
- 'dbt/**'
- '.github/workflows/dbt-ci.yml'
permissions:
contents: read
id-token: write # OIDC → AWS/GCP
pull-requests: write
concurrency:
group: dbt-ci-${{ github.ref }}
cancel-in-progress: true
env:
DBT_VERSION: "1.8.7"
DBT_ADAPTER: "dbt-trino==1.8.5"
jobs:
dbt-slim-ci:
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# --- Auth (OIDC, no static keys) ---
- name: Configure AWS credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/github-actions-dbt
aws-region: eu-central-1
# --- Python + dbt ---
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install dbt
run: |
pip install --upgrade pip
pip install ${{ env.DBT_ADAPTER }} "dbt-core==${{ env.DBT_VERSION }}"
- name: Install dbt packages
working-directory: dbt
run: dbt deps
# --- Download production manifest ---
- name: Download prod manifest
run: |
aws s3 cp s3://${{ vars.DBT_ARTIFACTS_BUCKET }}/prod/manifest.json \
./dbt/prod-artifacts/manifest.json || true
# "|| true" → first run when no prod artifact exists yet
# --- Compile (catches syntax errors fast) ---
- name: dbt compile
working-directory: dbt
env:
DBT_TARGET_HOST: ${{ secrets.TRINO_HOST }}
DBT_TARGET_USER: ${{ secrets.TRINO_USER }}
run: |
dbt compile \
--select "state:modified+" \
--state ./prod-artifacts/ \
--target ci
# --- Build (run + test) only changed + downstream ---
- name: dbt build — slim CI
working-directory: dbt
env:
DBT_TARGET_HOST: ${{ secrets.TRINO_HOST }}
DBT_TARGET_USER: ${{ secrets.TRINO_USER }}
run: |
dbt build \
--select "state:modified+" \
--state ./prod-artifacts/ \
--target ci \
--defer \
--favor-state # prefer prod results for unmodified nodes
# --- Upload CI manifest as artifact for PR comparison ---
- name: Upload CI manifest
if: always()
uses: actions/upload-artifact@v4
with:
name: dbt-manifest-ci-${{ github.run_id }}
path: dbt/target/manifest.json
retention-days: 7
dbt Docs Deploy to GitHub Pages
yaml
# .github/workflows/dbt-docs.yml
name: dbt Docs
on:
push:
branches: [main]
paths: ['dbt/**']
permissions:
contents: write
pages: write
id-token: write
jobs:
docs:
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install dbt
run: pip install dbt-trino==1.8.5
- name: dbt deps
working-directory: dbt
run: dbt deps
- name: Generate dbt docs
working-directory: dbt
env:
DBT_TARGET_HOST: ${{ secrets.TRINO_HOST_PROD }}
DBT_TARGET_USER: ${{ secrets.TRINO_USER_PROD }}
run: |
dbt docs generate --target prod
mkdir -p ../docs-site
cp -r target/catalog.json target/manifest.json target/index.html ../docs-site/
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs-site
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
Promote Prod Manifest After Successful Deploy
yaml
# job added to your production deploy workflow
publish-manifest:
needs: dbt-prod-run
runs-on: ubuntu-24.04
steps:
- name: Download run artifacts
uses: actions/download-artifact@v4
with:
name: dbt-manifest-prod-${{ github.run_id }}
path: ./artifacts
- name: Configure AWS credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/github-actions-dbt
aws-region: eu-central-1
- name: Push to S3
run: |
aws s3 cp ./artifacts/manifest.json \
s3://${{ vars.DBT_ARTIFACTS_BUCKET }}/prod/manifest.json

SQLFluff — SQL Linting with PR Annotations

.sqlfluff Config
ini
# .sqlfluff
[sqlfluff]
dialect = trino
templater = dbt
max_line_length = 120
exclude_rules = RF04 # RF04 = keyword capitalisation (optional)
[sqlfluff:templater:dbt]
project_dir = ./dbt
[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.identifiers]
capitalisation_policy = lower
[sqlfluff:rules:layout.indent]
indent_unit = space
tab_space_size = 4
Lint Workflow with Native GitHub Annotations
yaml
# .github/workflows/sqlfluff.yml
name: SQLFluff
on:
pull_request:
paths:
- 'dbt/models/**/*.sql'
- 'dbt/macros/**/*.sql'
- 'dbt/tests/**/*.sql'
- '.sqlfluff'
permissions:
contents: read
pull-requests: write # needed for PR comments
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install sqlfluff + dbt templater
run: pip install sqlfluff sqlfluff-templater-dbt dbt-trino==1.8.5
- name: Install dbt packages
working-directory: dbt
run: dbt deps
# --format github-annotation-native → inline PR annotations, no extra action needed
- name: sqlfluff lint
id: lint
working-directory: dbt
continue-on-error: true # collect all errors before failing
run: |
sqlfluff lint models/ macros/ tests/ \
--format github-annotation-native \
--annotation-level failure \
--dialect trino \
2>&1 | tee ../sqlfluff-output.txt
echo "exit_code=${PIPESTATUS[0]}" >> "$GITHUB_OUTPUT"
# Post a summary comment on the PR
- name: Comment lint results on PR
if: steps.lint.outputs.exit_code != '0'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const output = fs.readFileSync('sqlfluff-output.txt', 'utf8');
const body = `## SQLFluff Lint Results\n\`\`\`\n${output.slice(0, 60000)}\n\`\`\``;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body
});
- name: Fail if lint errors found
if: steps.lint.outputs.exit_code != '0'
run: exit 1
autofix:
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install sqlfluff
run: pip install sqlfluff sqlfluff-templater-dbt dbt-trino==1.8.5
- name: Install dbt packages
working-directory: dbt
run: dbt deps
- name: sqlfluff fix
working-directory: dbt
run: |
sqlfluff fix models/ macros/ \
--dialect trino \
--force
- name: Commit fixes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: sqlfluff autofix"
file_pattern: "dbt/models/**/*.sql dbt/macros/**/*.sql"

Airflow DAG Validation

pytest DAG Integrity Tests
python
# tests/test_dag_integrity.py
"""Structural DAG validation — runs without an Airflow database."""
import importlib
import os
from pathlib import Path
import pytest
from airflow.models import DagBag
DAG_FOLDER = Path(__file__).parent.parent / "dags"
LOAD_EXAMPLES = False
@pytest.fixture(scope="session")
def dagbag() -> DagBag:
return DagBag(dag_folder=str(DAG_FOLDER), include_examples=LOAD_EXAMPLES)
def test_no_import_errors(dagbag: DagBag) -> None:
"""All DAG files must import cleanly."""
assert dagbag.import_errors == {}, (
f"DAG import errors:\n"
+ "\n".join(f" {f}: {e}" for f, e in dagbag.import_errors.items())
)
def test_all_dags_have_tags(dagbag: DagBag) -> None:
"""Every DAG must declare at least one tag for discoverability."""
missing = [dag_id for dag_id, dag in dagbag.dags.items() if not dag.tags]
assert not missing, f"DAGs missing tags: {missing}"
def test_all_dags_have_owner(dagbag: DagBag) -> None:
"""default_args must specify owner (not the Airflow default 'airflow')."""
bad = [
dag_id
for dag_id, dag in dagbag.dags.items()
if dag.default_args.get("owner", "airflow") == "airflow"
]
assert not bad, f"DAGs with default owner: {bad}"
def test_no_cycles(dagbag: DagBag) -> None:
"""Airflow already detects cycles during DagBag load; assert none exist."""
# Cycle detection happens at load time; if dagbag loaded, we're good.
# But explicitly trigger the check for safety:
for dag_id, dag in dagbag.dags.items():
# This raises if a cycle is found
dag.test_cycle()

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ivanshamaev/de-agent-skills/github-actions-dataops/badge)](https://verified-skill.com/skills/ivanshamaev/de-agent-skills/github-actions-dataops)

Something wrong with this skill or its page? Tell us.