-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (71 loc) · 2.08 KB
/
pull-request-status-check.yml
File metadata and controls
79 lines (71 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Pull request ~ status check
on:
pull_request:
branches: [ "master" ]
jobs:
check-dependencies-changed:
runs-on:
group: infra1-runners-arc
labels: runners-small
permissions:
contents: read
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
changed:
- 'go.sum'
docker-build:
runs-on:
group: infra1-runners-arc
labels: runners-small
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag goodchanges:${{ github.sha }} \
--tag goodchanges:latest \
.
- name: Build summary
run: |
echo "### Docker Build Successful ✅" >> $GITHUB_STEP_SUMMARY
echo "Built image with tags:" >> $GITHUB_STEP_SUMMARY
echo "- goodchanges:${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
echo "- goodchanges:latest" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Platforms: linux/amd64, linux/arm64" >> $GITHUB_STEP_SUMMARY
fossa-scan:
permissions:
id-token: write
contents: read
pull-requests: read
name: fossa-scan
needs: check-dependencies-changed
if: ${{ needs.check-dependencies-changed.outputs.changed == 'true' }}
uses: ./.github/workflows/rw-fossa.yml
secrets: inherit
status-check-stage:
name: status-check-stage
if: ${{ !cancelled() }}
needs:
- docker-build
- fossa-scan
runs-on:
group: infra1-runners-arc
labels: runners-small
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}