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 :
6+ - main
7+ paths-ignore :
8+ - ' *.md'
9+ - ' LICENSE'
10+ - ' .gitignore'
11+ - ' README*.md'
12+
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ jobs :
18+ build-and-push :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Log in to 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 : Extract metadata
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ghcr.io/${{ github.repository }}
39+ tags : latest
40+
41+ - name : Build and push
42+ uses : docker/build-push-action@v5
43+ with :
44+ context : .
45+ push : true
46+ tags : ${{ steps.meta.outputs.tags }}
47+ labels : ${{ steps.meta.outputs.labels }}
48+ platforms : linux/amd64,linux/arm64
You can’t perform that action at this time.
0 commit comments