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 Publish Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build-and-push :
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - name : Setup lowercase name
18+ run : |
19+ echo "repository_owner_lowercased=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
20+
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : Log in to GitHub Container Registry
25+ uses : docker/login-action@v3
26+ with :
27+ registry : ghcr.io
28+ username : ${{ github.actor }}
29+ password : ${{ secrets.GITHUB_TOKEN }}
30+
31+ - name : Build Docker image
32+ run : |
33+ docker build -t ghcr.io/${{ env.repository_owner_lowercased }}/service_auth:latest .
34+
35+ - name : Push Docker image
36+ run : |
37+ docker push ghcr.io/${{ env.repository_owner_lowercased }}/service_auth:latest
You can’t perform that action at this time.
0 commit comments