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 : Publish Docker Image
2+
3+ on :
4+ push :
5+ tags : ["*"]
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+
11+ jobs :
12+ build-and-push-image :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v3
21+ - name : Registry Login
22+ uses : docker/login-action@v2
23+ with :
24+ registry : ${{ env.REGISTRY }}
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+ - name : Extract Metadata
28+ id : meta
29+ uses : docker/metadata-action@v4
30+ with :
31+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
32+ - name : Build and Push
33+ uses : docker/build-push-action@v3
34+ with :
35+ push : true
36+ context : .
37+ file : ./docker/Dockerfile.alpine
38+ tags : ${{ steps.meta.outputs.tags }}
39+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments