File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ # START OF COMMON SECTION
4+ on :
5+ push :
6+ branches : [ '*' ]
7+ paths :
8+ - ' .github/scripts/docker/Dockerfile'
9+ - ' .github/workflows/build-docker.yml'
10+ pull_request :
11+ branches : [ '*' ]
12+ paths :
13+ - ' .github/scripts/docker/Dockerfile'
14+ - ' .github/workflows/build-docker.yml'
15+ workflow_dispatch :
16+
17+ concurrency :
18+ group : ${{ github.workflow }}-${{ github.ref }}
19+ cancel-in-progress : true
20+ # END OF COMMON SECTION
21+
22+ jobs :
23+ build-and-push :
24+ runs-on : ubuntu-latest
25+ permissions :
26+ contents : read
27+ packages : write
28+
29+ steps :
30+ - name : Checkout repository
31+ uses : actions/checkout@v4
32+
33+ - name : Log in to GitHub Container Registry
34+ uses : docker/login-action@v3
35+ with :
36+ registry : ghcr.io
37+ username : ${{ github.actor }}
38+ password : ${{ secrets.GITHUB_TOKEN }}
39+
40+ - name : Extract metadata for Docker
41+ id : meta
42+ uses : docker/metadata-action@v5
43+ with :
44+ images : ghcr.io/${{ github.repository_owner }}/build-wolfprovider-debian
45+ tags : |
46+ type=raw,value=bookworm
47+ type=raw,value=latest
48+
49+ - name : Build and push Docker image
50+ uses : docker/build-push-action@v5
51+ with :
52+ context : .
53+ file : .github/scripts/docker/Dockerfile
54+ push : true
55+ tags : ${{ steps.meta.outputs.tags }}
56+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments