File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-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 : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build-and-push :
11+ runs-on : ubuntu-22.04
12+
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+
21+ - name : Set up QEMU
22+ uses : docker/setup-qemu-action@v3
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 : Build and push Docker image
35+ uses : docker/build-push-action@v5
36+ with :
37+ context : .
38+ push : true
39+ tags : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
40+ platforms : linux/amd64,linux/arm64
You can’t perform that action at this time.
0 commit comments