11---
22name : Build Airflow 
3+ run-name : | 
4+   Build Airflow (attempt #${{ github.run_attempt }}) 
35
46env :
57  PRODUCT_NAME : airflow 
8+   SDP_VERSION : ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }} 
69
710on :
811  workflow_dispatch :
912  schedule :
1013    - cron : ' 0 1 1/2 * *'   #  https://crontab.guru/#0_1_1/2_*_*
1114  push :
12-     branches :
13-       -  main 
15+     branches :  [main] 
16+     tags :  ['*'] 
1417    paths :
1518      #  To check dependencies, run this ( you will need to consider transitive dependencies)
1619      #  bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
1720      - airflow/** 
1821      - vector/** 
1922      - stackable-base/** 
2023      - .github/actions/** 
21-       - .github/workflows/dev_airflow .yaml 
24+       - .github/workflows/build_airflow .yaml 
2225
2326jobs :
2427  generate_matrix :
2730    steps :
2831      - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332  #  v4.1.7
2932      - id : shard 
30-         uses : stackabletech/actions/shard@e8781161bc1eb037198098334cec6061fe24b6c3   #  0.0.2 
33+         uses : stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c   #  0.2.0 
3134        with :
3235          product-name : ${{ env.PRODUCT_NAME }} 
3336    outputs :
@@ -49,16 +52,20 @@ jobs:
4952      - name : Checkout Repository 
5053        uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332  #  v4.1.7
5154
55+       - name : Free Disk Space 
56+         uses : stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c  #  0.2.0
57+ 
5258      - name : Build Product Image 
5359        id : build 
54-         uses : stackabletech/actions/build-product-image@e8781161bc1eb037198098334cec6061fe24b6c3   #  0.0.2 
60+         uses : stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c   #  0.2.0 
5561        with :
5662          product-name : ${{ env.PRODUCT_NAME }} 
5763          product-version : ${{ matrix.versions }} 
5864          build-cache-password : ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }} 
65+           sdp-version : ${{ env.SDP_VERSION }} 
5966
6067      - name : Publish Container Image on docker.stackable.tech 
61-         uses : stackabletech/actions/publish-image@e8781161bc1eb037198098334cec6061fe24b6c3   #  0.0.2 
68+         uses : stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c   #  0.2.0 
6269        with :
6370          image-registry-uri : docker.stackable.tech 
6471          image-registry-username : github 
6875          source-image-uri : localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }} 
6976
7077      - name : Publish Container Image on oci.stackable.tech 
71-         uses : stackabletech/actions/publish-image@e8781161bc1eb037198098334cec6061fe24b6c3   #  0.0.2 
78+         uses : stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c   #  0.2.0 
7279        with :
7380          image-registry-uri : oci.stackable.tech 
7481          image-registry-username : robot$sdp+github-action-build 
@@ -91,19 +98,65 @@ jobs:
9198        uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332  #  v4.1.7
9299
93100      - name : Publish and Sign Image Index Manifest to docker.stackable.tech 
94-         uses : stackabletech/actions/publish-index-manifest@e8781161bc1eb037198098334cec6061fe24b6c3   #  0.0.2 
101+         uses : stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c   #  0.2.0 
95102        with :
96103          image-registry-uri : docker.stackable.tech 
97104          image-registry-username : github 
98105          image-registry-password : ${{ secrets.NEXUS_PASSWORD }} 
99106          image-repository : stackable/${{ env.PRODUCT_NAME }} 
100-           image-index-manifest-tag : ${{ matrix.versions }}-stackable0.0.0-dev  
107+           image-index-manifest-tag : ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }}  
101108
102109      - name : Publish and Sign Image Index Manifest to oci.stackable.tech 
103-         uses : stackabletech/actions/publish-index-manifest@e8781161bc1eb037198098334cec6061fe24b6c3   #  0.0.2 
110+         uses : stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c   #  0.2.0 
104111        with :
105112          image-registry-uri : oci.stackable.tech 
106113          image-registry-username : robot$sdp+github-action-build 
107114          image-registry-password : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }} 
108115          image-repository : sdp/${{ env.PRODUCT_NAME }} 
109-           image-index-manifest-tag : ${{ matrix.versions }}-stackable0.0.0-dev 
116+           image-index-manifest-tag : ${{ matrix.versions }}-stackable${{ env.SDP_VERSION }} 
117+ 
118+   notify :
119+     name : Failure Notification 
120+     needs : [generate_matrix, build, publish_manifests] 
121+     runs-on : ubuntu-latest 
122+     if : failure() 
123+     steps :
124+       - uses : slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0  #  v1.27.0
125+         with :
126+           channel-id : " C07UG6JH44F"   #  notifications-container-images
127+           payload : | 
128+             { 
129+               "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", 
130+               "attachments": [ 
131+                 { 
132+                   "pretext": "See the details below for a summary of which job(s) failed.", 
133+                   "color": "#aa0000", 
134+                   "fields": [ 
135+                     { 
136+                       "title": "Generate Version List", 
137+                       "short": true, 
138+                       "value": "${{ needs.generate_matrix.result }}" 
139+                     }, 
140+                     { 
141+                       "title": "Build/Publish Image", 
142+                       "short": true, 
143+                       "value": "${{ needs.build.result }}" 
144+                     }, 
145+                     { 
146+                       "title": "Build/Publish Manifests", 
147+                       "short": true, 
148+                       "value": "${{ needs.publish_manifests.result }}" 
149+                     } 
150+                   ], 
151+                   "actions": [ 
152+                     { 
153+                       "type": "button", 
154+                       "text": "Go to workflow run", 
155+                       "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" 
156+                     } 
157+                   ] 
158+                 } 
159+               ] 
160+             } 
161+          env :
162+           SLACK_BOT_TOKEN : ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} 
0 commit comments