File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Deploy
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ workflow_dispatch :
9+
10+ jobs :
11+ build-and-push :
12+ runs-on : ubuntu-latest
13+ permissions : write-all
14+
15+ strategy :
16+ matrix :
17+ platform : [ linux/amd64 ]
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v3
22+
23+ - name : Lowercase repository name
24+ run : echo "REPO=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
25+
26+ - name : Set up QEMU
27+ uses : docker/setup-qemu-action@v3
28+
29+ - name : Set up Docker Buildx
30+ uses : docker/setup-buildx-action@v3
31+
32+ - name : Log in to GitHub Container Registry
33+ uses : docker/login-action@v2
34+ with :
35+ registry : ghcr.io
36+ username : ${{ github.actor }}
37+ password : ${{ secrets.GITHUB_TOKEN }}
38+
39+ - name : Build and push Docker image
40+ uses : docker/build-push-action@v5
41+ with :
42+ context : .
43+ platforms : ${{ matrix.platform }}
44+ push : true
45+ tags : ghcr.io/${{ env.REPO }}:${{ github.sha }}
You can’t perform that action at this time.
0 commit comments