|
4 | 4 | branches: [main] |
5 | 5 | paths: |
6 | 6 | - 'tools/agents/agent-splunk/**' |
| 7 | + pull_request: |
| 8 | + branches: [main] |
| 9 | + paths: |
| 10 | + - 'tools/agents/agent-splunk/**' |
7 | 11 | workflow_dispatch: |
8 | 12 |
|
9 | 13 | jobs: |
10 | 14 | build: |
11 | 15 | runs-on: ubuntu-latest |
12 | 16 | steps: |
13 | | - - uses: actions/checkout@v4 |
14 | | - - uses: actions/setup-go@v5 |
| 17 | + - uses: actions/checkout@v5 |
| 18 | + - uses: actions/setup-go@v6 |
15 | 19 | with: |
16 | 20 | go-version: '1.25' |
17 | 21 | - name: Build |
18 | 22 | working-directory: tools/agents/agent-splunk |
19 | 23 | run: CGO_ENABLED=0 go build -o agent-splunk . |
20 | 24 | - name: Upload binary artifact |
21 | | - uses: actions/upload-artifact@v4 |
| 25 | + uses: actions/upload-artifact@v5 |
22 | 26 | with: |
23 | 27 | name: agent-splunk |
24 | 28 | path: tools/agents/agent-splunk/agent-splunk |
25 | 29 | - name: Build and push image |
26 | | - uses: docker/build-push-action@v5 |
| 30 | + uses: docker/build-push-action@v6 |
27 | 31 | with: |
28 | 32 | context: tools/agents/agent-splunk |
29 | | - push: true |
| 33 | + file: tools/agents/agent-splunk/Containerfile |
| 34 | + push: ${{ github.event_name != 'pull_request' }} |
30 | 35 | tags: ghcr.io/pulp/agent-splunk:latest |
31 | 36 |
|
32 | 37 | release: |
33 | 38 | needs: build |
34 | 39 | runs-on: ubuntu-latest |
35 | | - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
| 40 | + #if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
36 | 41 | permissions: |
37 | 42 | contents: write |
38 | 43 | steps: |
39 | | - - uses: actions/checkout@v4 |
| 44 | + - uses: actions/checkout@v5 |
40 | 45 | - name: Determine version |
41 | 46 | id: version |
42 | 47 | run: | |
|
46 | 51 | fi |
47 | 52 | echo "tag=$VERSION" >> "$GITHUB_OUTPUT" |
48 | 53 | - name: Download binary artifact |
49 | | - uses: actions/download-artifact@v4 |
| 54 | + uses: actions/download-artifact@v5 |
50 | 55 | with: |
51 | 56 | name: agent-splunk |
52 | 57 | - name: Create GitHub Release |
|
0 commit comments