|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | docker-build-check: |
10 | | - name: Docker Build Check |
| 10 | + name: SDM Docker Image Build # Renamed job to be more descriptive |
11 | 11 | runs-on: ubuntu-24.04 |
12 | | - permissions: |
13 | | - contents: write # Required for creating commit statuses |
14 | | - pull-requests: read |
15 | 12 | steps: |
16 | | - # Create initial pending status for build check |
17 | | - - name: Create Pending Build Status |
18 | | - env: |
19 | | - GH_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }} |
20 | | - run: | |
21 | | - HEAD_SHA="${{ github.event.pull_request.head.sha }}" |
22 | | - gh api \ |
23 | | - --method POST \ |
24 | | - -H "Accept: application/vnd.github+json" \ |
25 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
26 | | - repos/${{ github.repository }}/statuses/$HEAD_SHA \ |
27 | | - -f state="pending" \ |
28 | | - -f description="Building SDM Docker image..." \ |
29 | | - -f context="SDM Docker Image Build" |
30 | | -
|
31 | 13 | - name: Checkout code |
32 | 14 | uses: actions/checkout@v4 |
33 | 15 | with: |
|
60 | 42 | push: false |
61 | 43 | tags: airbyte/source-declarative-manifest:pr-${{ github.event.pull_request.number }} |
62 | 44 | outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=SDM Docker image for PR ${{ github.event.pull_request.number }} |
63 | | - |
64 | | - - name: Update Build Status on Success |
65 | | - if: success() |
66 | | - env: |
67 | | - GH_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }} |
68 | | - run: | |
69 | | - HEAD_SHA="${{ github.event.pull_request.head.sha }}" |
70 | | - gh api \ |
71 | | - --method POST \ |
72 | | - -H "Accept: application/vnd.github+json" \ |
73 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
74 | | - repos/${{ github.repository }}/statuses/$HEAD_SHA \ |
75 | | - -f state="success" \ |
76 | | - -f description="SDM Docker image builds successfully" \ |
77 | | - -f context="SDM Docker Image Build" |
78 | | -
|
79 | | - - name: Update Build Status on Failure |
80 | | - if: failure() |
81 | | - env: |
82 | | - GH_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }} |
83 | | - run: | |
84 | | - HEAD_SHA="${{ github.event.pull_request.head.sha }}" |
85 | | - gh api \ |
86 | | - --method POST \ |
87 | | - -H "Accept: application/vnd.github+json" \ |
88 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
89 | | - repos/${{ github.repository }}/statuses/$HEAD_SHA \ |
90 | | - -f state="failure" \ |
91 | | - -f description="SDM Docker image is broken" \ |
92 | | - -f context="SDM Docker Image Build" |
0 commit comments