File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Publish Docker Image
2+
3+ on :
4+ push :
5+ branches : [main]
6+ release :
7+ types : [published]
8+
9+ jobs :
10+ docker-build-publish :
11+ name : Build and Publish Docker Image
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Set up Docker Buildx
16+ uses : docker/setup-buildx-action@v3
17+
18+ - name : Checkout Repository
19+ uses : actions/checkout@v6
20+
21+ - name : Log in to Docker Hub
22+ if : github.repository == 'finos/git-proxy'
23+ uses : docker/login-action@v3
24+ with :
25+ username : finos
26+ password : ${{ secrets.DOCKER_PASSWORD }}
27+
28+ - name : Set Docker Image Tag
29+ id : tags
30+ run : |
31+ if [ "${{ github.event_name }}" = "release" ]; then
32+ echo "tags=finos/git-proxy:${{ github.ref_name }},finos/git-proxy:latest" >> $GITHUB_OUTPUT
33+ else
34+ echo "tags=finos/git-proxy:main" >> $GITHUB_OUTPUT
35+ fi
36+
37+ - name : Build and Publish Docker Image
38+ if : github.repository == 'finos/git-proxy'
39+ uses : docker/build-push-action@v6
40+ with :
41+ context : .
42+ file : Dockerfile
43+ push : true
44+ tags : ${{ steps.tags.outputs.tags }}
45+ provenance : true
You can’t perform that action at this time.
0 commit comments