File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Docker Build Web"
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : ' Tag for the Docker image'
8+ required : false
9+ default : ' latest'
10+ type : string
11+
12+ jobs :
13+ build :
14+ name : Build Docker Image
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - name : Checkout Repository
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Login to GitHub Container Registry
28+ uses : docker/login-action@v3
29+ with :
30+ registry : ghcr.io
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Prepare Docker Metadata
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ghcr.io/capsoftware/cap-web
39+ tags : |
40+ type=raw,value=${{ inputs.tag || 'latest' }}
41+
42+ - name : Build Docker Image
43+ uses : docker/build-push-action@v5
44+ with :
45+ context : .
46+ file : apps/web/Dockerfile
47+ platforms : linux/amd64
48+ tags : ${{ steps.meta.outputs.tags }}
49+ push : true
50+ load : false
51+ cache-from : type=gha
52+ cache-to : type=gha,mode=max
53+
54+ - name : Show Docker Images
55+ run : docker images
File renamed without changes.
You can’t perform that action at this time.
0 commit comments