-
Notifications
You must be signed in to change notification settings - Fork 18
39 lines (33 loc) · 1.04 KB
/
Copy pathdocker-image-ci.yml
File metadata and controls
39 lines (33 loc) · 1.04 KB
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: Docker Image CI
on:
pull_request:
branches: ['main']
paths:
- 'Dockerfile'
- 'scripts/*'
- '.github/workflows/docker-image-ci.yml'
- 'samples/'
# Abort the previous running CI workflow in the same pull request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v5
- name: Build the Docker image
run: |
SHA7=${GITHUB_SHA::7}
echo $SHA7
docker build . --file Dockerfile --tag "devops-toolkit-review:$GITHUB_SHA"
- name: Verify tool versions
run: |
cd scripts
chmod +x check_version_in_toolkit.sh
./check_version_in_toolkit.sh "devops-toolkit-review:$GITHUB_SHA" "../toolkit_info.json"
- name: Running Sample Tool Code
run: |
echo "Run sample tool code inside toolkit"
docker run --rm devops-toolkit-review:$GITHUB_SHA samples/run_sample.sh