File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches : [main]
6+ paths :
7+ - ' backend/Dockerfile.sandbox'
8+ - ' backend/containers/**'
9+ workflow_dispatch :
10+
11+ env :
12+ REGISTRY : ghcr.io
13+ IMAGE_NAME : ${{ github.repository }}/terminal-sandbox
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ permissions :
19+ contents : read
20+ packages : write
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Log in to Container Registry
27+ uses : docker/login-action@v3
28+ with :
29+ registry : ${{ env.REGISTRY }}
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Extract metadata
34+ id : meta
35+ uses : docker/metadata-action@v5
36+ with :
37+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+ tags : |
39+ type=raw,value=latest
40+ type=sha,prefix=
41+
42+ - name : Build and push
43+ uses : docker/build-push-action@v5
44+ with :
45+ context : ./backend
46+ file : ./backend/Dockerfile.sandbox
47+ push : true
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments