File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,10 +2,49 @@ name: Dependabot CI
22on :
33 pull_request_target :
44 branches : [develop, main]
5+
6+ permissions :
7+ contents : read
8+ statuses : write
9+
510jobs :
611 build-and-test :
12+ runs-on : ubuntu-latest
713 if : github.actor == 'dependabot[bot]'
8- uses : fireflyframework/.github/.github/workflows/go-ci.yml@main
9- with :
10- go-version : ' 1.25'
11- checkout-ref : ${{ github.event.pull_request.head.sha }}
14+ steps :
15+ - name : Checkout PR code
16+ uses : actions/checkout@v4
17+ with :
18+ ref : ${{ github.event.pull_request.head.sha }}
19+
20+ - name : Set up Go 1.25
21+ uses : actions/setup-go@v5
22+ with :
23+ go-version : ' 1.25'
24+
25+ - name : Vet
26+ run : go vet ./...
27+
28+ - name : Test
29+ run : go test -v -race -coverprofile=coverage.out ./...
30+
31+ - name : Build
32+ run : go build -o /dev/null .
33+
34+ - name : Report build status
35+ if : always()
36+ env :
37+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ run : |
39+ if [ "${{ job.status }}" = "success" ]; then
40+ STATE="success"
41+ DESC="Dependabot build passed"
42+ else
43+ STATE="failure"
44+ DESC="Dependabot build failed"
45+ fi
46+ gh api "repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }}" \
47+ -f state="$STATE" \
48+ -f context="build-and-test / build-and-test" \
49+ -f description="$DESC" \
50+ -f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
You can’t perform that action at this time.
0 commit comments