mirror of
https://github.com/iminet/dev.git
synced 2026-08-22 23:28:25 +02:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: Hello GitHub Actions
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
- cron: "0 */6 * * *"
|
|
|
|
jobs:
|
|
hello:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-dotnet@v6
|
|
with:
|
|
dotnet-version: '10.0.x'
|
|
|
|
- name: Dotnet info
|
|
run: dotnet --info
|
|
|
|
- name: Say hello
|
|
run: echo "Hello from GitHub Actions!"
|
|
|
|
- name: Show operating system
|
|
run: uname -a
|
|
|
|
- name: Show current directory
|
|
run: pwd
|
|
|
|
- name: List files
|
|
run: ls -la
|
|
|
|
- name: Show current time
|
|
run: date
|
|
|
|
- name: VM summary
|
|
run: |
|
|
echo "CPU cores: $(nproc)"
|
|
echo "CPU: $(lscpu | grep 'Model name' | head -1 | cut -d: -f2- | xargs)"
|
|
echo "RAM: $(free -h | awk '/^Mem:/ {print $2}')"
|
|
echo "Available RAM: $(free -h | awk '/^Mem:/ {print $7}')"
|
|
echo "Disk: $(df -h / | awk 'NR==2 {print $2}')"
|
|
echo "Available disk: $(df -h / | awk 'NR==2 {print $4}')"
|
|
echo "OS: $(lsb_release -ds 2>/dev/null || cat /etc/os-release | grep PRETTY_NAME)"
|
|
|
|
- name: Print repository variable
|
|
run: |
|
|
echo "TEST_MESSAGE=$TEST_MESSAGE"
|
|
env:
|
|
TEST_MESSAGE: ${{ vars.TEST_MESSAGE }}
|
|
|
|
- name: Print directly
|
|
run: |
|
|
echo "Direct: ${{ vars.TEST_MESSAGE }}" |