File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image to GHCR on Release
2+
3+ on :
4+ workflow_dispatch :
5+ branches :
6+
7+ push :
8+ tags :
9+ - ' v*'
10+
11+ release :
12+ types :
13+ - created
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ - name : Set up QEMU
24+ uses : docker/setup-qemu-action@v3
25+
26+ - name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v3
28+
29+ - name : Login to GitHub Container Registry
30+ uses : docker/login-action@v3
31+ with :
32+ registry : ghcr.io
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.GITHUB_TOKEN }}
35+
36+ - name : Extract release tag
37+ id : extract_tag
38+ run : echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
39+
40+ - name : Build and push Docker image
41+ uses : docker/build-push-action@v5
42+ with :
43+ context : .
44+ push : true
45+ tags : |
46+ ghcr.io/${{ github.repository_owner }}/joylive-injector:${{ env.RELEASE_TAG }}
47+ platforms : linux/amd64,linux/arm64/v8
48+
49+ - name : Logout from GitHub Container Registry
50+ run : docker logout ghcr.io
You can’t perform that action at this time.
0 commit comments