-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.96 KB
/
dirsearch.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build and Push maurosoria/dirsearch to burso/dirsearch
on:
push:
branches:
- main # Change to your default branch if not main
pull_request:
branches:
- main # Change to your default branch if not main
jobs:
build-and-push:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
- name: Set release version
id: set_version
run: echo "RELEASE_VERSION=v0.4.3" >> $GITHUB_ENV
- name: Clone Dirsearch repository at specific version
run: |
git clone --branch ${{ env.RELEASE_VERSION }} https://github.com/maurosoria/dirsearch.git
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
run: |
docker buildx build --push \
--tag ${{ secrets.DOCKER_HUB_USERNAME }}/dirsearch:${{ env.RELEASE_VERSION }} \
--tag ${{ secrets.DOCKER_HUB_USERNAME }}/dirsearch:latest \
--platform linux/amd64,linux/arm64 ./dirsearch
- name: Logout from Docker Hub
run: docker logout
- name: Check burso/dirsearch image
uses: snyk/actions/docker@master
with:
image: burso/dirsearch
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif