File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Github Packages CD
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+ name : Build and Push Image
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ - name : Log in to the Container registry
19+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
20+ with :
21+ registry : ${{ env.REGISTRY }}
22+ username : ${{ github.actor }}
23+ password : ${{ secrets.GITHUB_TOKEN }}
24+ - name : Extract metadata (tags, labels) for Docker
25+ id : meta
26+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
27+ with :
28+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
29+ - name : Build and push Docker image
30+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
31+ with :
32+ context : .
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