-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-workflow.yml
More file actions
39 lines (32 loc) · 964 Bytes
/
example-workflow.yml
File metadata and controls
39 lines (32 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Example Self-Hosted Runner Workflow
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test-runner:
runs-on: [self-hosted, docker, linux, org]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Test Docker access
run: |
echo "Testing Docker access..."
docker version
docker ps
- name: Build test image
run: |
cat > Dockerfile.test << 'EOF'
FROM alpine:latest
RUN echo "Hello from self-hosted runner!"
CMD ["echo", "Container running successfully"]
EOF
docker build -f Dockerfile.test -t test-image:latest .
docker run --rm test-image:latest
- name: Environment info
run: |
echo "Runner name: $RUNNER_NAME"
echo "Runner OS: $RUNNER_OS"
echo "Runner arch: $RUNNER_ARCH"
uname -a