DevOps Einsteiger
GitHub Actions von Grund auf¶
GitHub ActionsCI/CDAutomation 3 Min. Lesezeit
CI/CD mit GitHub Actions. Workflows, Jobs, Steps und die erste Pipeline.
Grundlegender Workflow¶
name: CI
on:
push: {branches: [main]}
pull_request: {branches: [main]}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: {node-version: 20}
- run: npm ci
- run: npm test
deploy:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Deploy"
Secrets und Matrix¶
Secrets: Settings > Secrets. Zugriff: ${{ secrets.MY_SECRET }}.
strategy:
matrix:
node: [18, 20, 22]
os: [ubuntu-latest, macos-latest]
Zusammenfassung¶
GitHub Actions = CI/CD direkt in GitHub. Marketplace mit Tausenden fertiger Actions.
Brauchen Sie Hilfe bei der Implementierung?¶
Unser Team hat Erfahrung mit dem Entwurf und der Implementierung moderner Architekturen. Wir helfen Ihnen gerne.