@@ -10,22 +10,23 @@ jobs:
1010 build :
1111 runs-on : ubuntu-latest
1212 steps :
13- - uses : actions/checkout@v4
14- - uses : actions/setup-go@v5
13+ - uses : actions/checkout@v5
14+ - uses : actions/setup-go@v6
1515 with :
1616 go-version : ' 1.25'
1717 - name : Build
1818 working-directory : tools/agents/agent-splunk
1919 run : CGO_ENABLED=0 go build -o agent-splunk .
2020 - name : Upload binary artifact
21- uses : actions/upload-artifact@v4
21+ uses : actions/upload-artifact@v5
2222 with :
2323 name : agent-splunk
2424 path : tools/agents/agent-splunk/agent-splunk
2525 - name : Build and push image
26- uses : docker/build-push-action@v5
26+ uses : docker/build-push-action@v6
2727 with :
2828 context : tools/agents/agent-splunk
29+ file : tools/agents/agent-splunk/Containerfile
2930 push : true
3031 tags : ghcr.io/pulp/agent-splunk:latest
3132
3637 permissions :
3738 contents : write
3839 steps :
39- - uses : actions/checkout@v4
40+ - uses : actions/checkout@v5
4041 - name : Determine version
4142 id : version
4243 run : |
@@ -46,13 +47,19 @@ jobs:
4647 fi
4748 echo "tag=$VERSION" >> "$GITHUB_OUTPUT"
4849 - name : Download binary artifact
49- uses : actions/download-artifact@v4
50+ uses : actions/download-artifact@v5
5051 with :
5152 name : agent-splunk
5253 - name : Create GitHub Release
53- uses : softprops/action-gh-release@v2
54- with :
55- tag_name : ${{ steps.version.outputs.tag }}
56- name : agent-splunk ${{ steps.version.outputs.tag }}
57- generate_release_notes : true
58- files : agent-splunk
54+ env :
55+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56+ run : |
57+ TAG="${{ steps.version.outputs.tag }}"
58+ if gh release view "$TAG" > /dev/null 2>&1; then
59+ gh release upload "$TAG" agent-splunk --clobber
60+ else
61+ gh release create "$TAG" \
62+ --title "agent-splunk $TAG" \
63+ --generate-notes \
64+ agent-splunk
65+ fi
0 commit comments