File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1- name : CI
1+ name : Run Continuous Integration
22on :
33 push :
44 branches : [main]
Original file line number Diff line number Diff line change 1+ name : Build and Publish Docker Image to GHCR
2+ on :
3+ release :
4+ types : [published]
5+ env :
6+ REGISTRY : ghcr.io
7+ IMAGE_NAME : ${{ github.repository }}
8+ jobs :
9+ build-and-push-image :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+ - name : Log in to GitHub Container Registry
18+ uses : docker/login-action@v3
19+ with :
20+ registry : ${{ env.REGISTRY }}
21+ username : ${{ github.actor }}
22+ password : ${{ secrets.GITHUB_TOKEN }}
23+ - name : Extract metadata (tags, labels) for Docker
24+ id : meta
25+ uses : docker/metadata-action@v5
26+ with :
27+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
28+ - name : Build and push Docker image
29+ uses : docker/build-push-action@v6
30+ with :
31+ context : .
32+ target : production
33+ push : true
34+ tags : ${{ steps.meta.outputs.tags }}
35+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments