| name | devops |
| description | DevOps skills for CI/CD, GitHub workflows, and infrastructure automation Use when this capability is needed. |
| metadata | {"author":"flexnetos"} |
DevOps Skills
Overview
This skill provides expertise in DevOps practices including CI/CD pipelines, GitHub workflows, and infrastructure automation.
Git Operations
Basic Workflow
gs
ga
gc
gp
gl
Branching
gco <branch>
gb
git checkout -b feature/name
git merge <branch>
History
glog
gd
git log --oneline -10
git blame <file>
GitHub CLI (gh)
Pull Requests
gh pr create
gh pr create --title "Title" --body "Body"
gh pr list
gh pr view <number>
gh pr checkout <number>
gh pr merge <number>
Issues
gh issue create
gh issue list
gh issue view <number>
gh issue close <number>
Workflows
gh run list
gh run view <run-id>
gh run watch <run-id>
gh workflow run <workflow>
Releases
gh release create v1.0.0
gh release list
gh release download
GitHub Actions
Workflow Structure
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- run: nix develop --command echo "Ready"
Common Actions
actions/checkout@v4 - Checkout repository
DeterminateSystems/nix-installer-action@main - Install Nix
DeterminateSystems/magic-nix-cache-action@main - Nix cache
actions/upload-artifact@v4 - Upload artifacts
Self-Hosted Runners
runs-on: [self-hosted, Windows, WSL2]
See: .github/docs/self-hosted-runner-setup.md
Container Operations
Docker
docker build -t image:tag .
docker run -it image:tag
docker push registry/image:tag
docker compose up -d
Multi-Stage Builds
FROM nixos/nix AS builder
RUN nix build .#package
FROM alpine
COPY --from=builder /result /app
Infrastructure as Code
Nix-based Deployments
nix build .#nixosConfigurations.host.config.system.build.toplevel
nixos-rebuild switch --flake .#host
Home Manager
home-manager switch --flake .#user
Secrets Management
GitHub Secrets
- Set via: Settings → Secrets and variables → Actions
- Access in workflow:
${{ secrets.SECRET_NAME }}
- Never log secrets in workflow output
Local Development
- Use
.env files (gitignored)
- Use
pass or 1password-cli for credential storage
- Use
sops for encrypted secrets in git
Monitoring
Workflow Status
gh run list --limit 5
gh run view --log
gh api repos/{owner}/{repo}/actions/runs
Health Checks
- Add status badges to README
- Set up branch protection rules
- Configure required status checks
Best Practices
- Pin action versions - Use SHA or version tags
- Cache dependencies - Use Nix cache actions
- Fail fast - Use
continue-on-error: false
- Matrix builds - Test multiple platforms
- Reusable workflows - Extract common patterns
Troubleshooting
Workflow Failures
- Check
gh run view --log for details
- Verify secrets are set correctly
- Check runner availability for self-hosted
Permission Issues
- Verify
GITHUB_TOKEN permissions
- Check repository settings for actions
Related Skills
Converted and distributed by TomeVault — claim your Tome and manage your conversions.