File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build & Run Docker Image
2
+
3
+ on :
4
+ pull_request :
5
+ # Only kick workflow if docker files or this workflow are changed
6
+ paths :
7
+ - ' docker/**'
8
+ - ' .github/workflows/docker-image.yml'
9
+
10
+ jobs :
11
+ validate :
12
+ runs-on : ubuntu-22.04
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0 # Fetch full history including branches and tags
18
+
19
+ - name : Set up Docker Buildx
20
+ uses : docker/setup-buildx-action@v3
21
+
22
+ - name : Build Docker image
23
+ run : docker build --rm --build-arg user=$(id -un) --build-arg uid=$(id -u) -f ./docker/image/Dockerfile -t test-image:latest .
24
+
25
+ - name : Run container and verify
26
+ run : |
27
+ docker run --rm --user $(id -u):$(id -g) -v $(pwd):/tmp/doc_repository test-image:latest
You can’t perform that action at this time.
0 commit comments