🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

Basic GitHub Actions Checkout

↗ Quelle (dev.to)
🗣️ Stimme:

Overview

This hands-on lab introduces the fundamentals of GitHub Actions by implementing a basic workflow that demonstrates repository checkout and command execution. You'll learn how to create a workflow file, understand its structure, and execute various commands.



Prerequisites




  • GitHub account

  • A GitHub repository where you have write access

  • Basic understanding of YAML syntax

  • Basic knowledge of command line operations

    Learning Objectives

    After completing this lab, you will be able to:


  • Create a basic GitHub Actions workflow file


  • Understand workflow trigger conditions


  • Execute single and multi-line commands


  • Use the checkout action


  • View and interpret workflow results




Lab Structure




CODE
your-repository/
├── .github/
│ └── workflows/
│ └── basic-checkout.yml
└── README.md






Implementation Guide

Step 1: Create Workflow Directory




CODE
mkdir -p .github/workflows






Step 2: Create Workflow File

Create .github/workflows/basic-checkout.yml with the following content:




CODE
name: Basic Checkout Lab

# Trigger on push to main branch
on:
push:
branches:
- main

# Define jobs and their steps
jobs:
basic-checkout:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4

# Step 2: List repository contents
- name: List files
run: ls -la

# Step 3: Display system information
- name: Show system info
run: |
echo "Repository: $GITHUB_REPOSITORY"
echo "Operating System: $(uname -a)"
echo "Current Directory: $(pwd)"

# Step 4: Check software versions
- name: Check versions
run: |
echo "Node version: $(node --version)"
echo "Python version: $(python --version)"
echo "Git version: $(git --version)"






Detailed Explanation

Workflow Trigger

on:

push:

branches:

- main

This section configures the workflow to run whenever code is pushed to the main branch.



Job Configuration

jobs:

basic-checkout:

runs-on: ubuntu-latest


Defines a single job named basic-checkout

Specifies Ubuntu as the runner operating system

Steps Breakdown

`Checkout Step




  • name: Checkout repository
    uses: actions/checkout@v4
    Uses the official checkout action
    Clones your repository into the runner
    Essential for accessing repository files
    File Listing

  • name: List files
    run: ls -la
    Lists all files and directories
    Includes hidden files
    Shows file permissions and ownership
    System Information
    - name: Show system info
    run: |
    echo "Repository: $GITHUB_REPOSITORY"
    echo "Operating System: $(uname -a)"
    echo "Current Directory: $(pwd)"
    Uses multi-line commands
    Demonstrates environment variable usage
    Shows system details
    Version Checks

  • name: Check versions
    run: |
    echo "Node version: $(node --version)"
    echo "Python version: $(python --version)"
    echo "Git version: $(git --version)"`
    Checks installed software versions
    Uses command substitution
    Demonstrates multi-line commands
    Expected Outputs



CODE
File Listing Output
total 24
drwxr-xr-x 4 runner docker 4096 Feb 20 10:00 .
drwxr-xr-x 3 runner docker 4096 Feb 20 10:00 ..
drwxr-xr-x 8 runner docker 4096 Feb 20 10:00 .git
drwxr-xr-x 3 runner docker 4096 Feb 20 10:00 .github
-rw-r--r-- 1 runner docker 654 Feb 20 10:00 README.md





System Information Output




CODE
Repository: username/repository-name
Operating System: Linux runner-ubuntu-latest 5.15.0-1047-azure
Current Directory: /home/runner/work/repository-name/repository-name
Version Information Output
Node version: v20.11.0
Python version: Python 3.10.12
Git version: git version 2.42.0






Practice Exercises

Add New Commands Modify the workflow to include:




  • Current date and time

  • Available disk space

  • Memory usage
    Custom Environment Variables Add environment variables:



env:

CUSTOM_MESSAGE: "Hello from GitHub Actions!"


Conditional Execution Add a conditional step:



- name: Conditional step

if: github.event_name == 'push'

run: echo "This was triggered by a push event"


Troubleshooting

Common Issues and Solutions

Workflow Not Triggering




  • Verify branch name matches trigger condition

  • Check workflow file syntax

  • Ensure Actions are enabled in repository settings

  • Checkout Action Fails






Verify Git configuration






CODE
git config --global --list









Check permissions






CODE
ls -la .git






Command Execution Errors



Check command availability on runner

Verify syntax for multi-line commands

Ensure proper environment variable usage

Debugging Tips

Enable debug logging by setting secret ACTIONS_RUNNER_DEBUG to true

Check workflow run logs in GitHub Actions tab

Use echo statements to debug variables






Additional Resources:






Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Basic GitHub Actions Checkout

Thematisch verwandte Begriffe: Basic, GitHub, Actions, Checkout · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...