File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -29,22 +29,35 @@ jobs:
2929 env :
3030 DOCKER_TAG : ${{ inputs.docker_tag }}
3131 steps :
32- - uses : actions/checkout@v4
32+ - uses : actions/checkout@v6
3333
34- - uses : actions/setup-go@v5
34+ - name : Check for Go project
35+ id : check-go
36+ run : |
37+ if [ -f "go.mod" ]; then
38+ echo "go-project=true" >> $GITHUB_OUTPUT
39+ echo "Go project detected"
40+ else
41+ echo "go-project=false" >> $GITHUB_OUTPUT
42+ echo "No Go project detected"
43+ fi
44+
45+ - name : Setup Go
46+ if : steps.check-go.outputs.go-project == 'true'
47+ uses : actions/setup-go@v6
3548 with :
3649 go-version-file : ' go.mod'
3750 cache : true
3851
3952 - name : Login to Docker Registry
40- uses : docker/login-action@v3.4.0
53+ uses : docker/login-action@v3
4154 with :
4255 registry : ${{ inputs.docker_registry }}
4356 username : ${{ secrets.DOCKERHUB_USERNAME }}
4457 password : ${{ secrets.DOCKERHUB_PASSWORD }}
4558
4659 - name : Login to GitHub Container Registry
47- uses : docker/login-action@v3.4.0
60+ uses : docker/login-action@v3
4861 with :
4962 registry : ${{ inputs.github_registry }}
5063 username : ${{ github.actor }}
You can’t perform that action at this time.
0 commit comments