File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ permissions :
9+ contents : read
10+ packages : write
11+
12+ jobs :
13+ build-and-push :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Log in to GitHub Container Registry
24+ uses : docker/login-action@v3
25+ with :
26+ registry : ghcr.io
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Extract metadata for Docker
31+ id : meta
32+ uses : docker/metadata-action@v5
33+ with :
34+ images : ghcr.io/${{ github.repository_owner }}/nikto
35+ tags : |
36+ latest
37+ type=ref,event=branch
38+ type=sha
39+
40+ - name : Build and push Docker image
41+ uses : docker/build-push-action@v5
42+ with :
43+ context : .
44+ file : Dockerfile
45+ push : true
46+ platforms : linux/amd64,linux/arm64
47+ tags : ${{ steps.meta.outputs.tags }}
48+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments