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 : Docker Image
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Set up QEMU
19+ uses : docker/setup-qemu-action@v3
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v3
23+
24+ - name : Login to GHCR
25+ uses : docker/login-action@v3
26+ with :
27+ registry : ghcr.io
28+ username : ${{ github.actor }}
29+ password : ${{ secrets.GITHUB_TOKEN }}
30+
31+ - name : Set image name
32+ run : echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
33+
34+ - name : Build and push
35+ uses : docker/build-push-action@v6
36+ with :
37+ context : .
38+ push : true
39+ tags : ${{ env.IMAGE_NAME }}:latest
40+ platforms : linux/amd64
You can’t perform that action at this time.
0 commit comments