@@ -3,22 +3,23 @@ name: Build Airflow
33
44env :
55 PRODUCT_NAME : airflow
6+ SDP_VERSION : ${{ github.ref_type == 'tag' && github.ref_name || '0.0.0-dev' }}
67
78on :
89 workflow_dispatch :
910 schedule :
1011 - cron : ' 0 1 1/2 * *' # https://crontab.guru/#0_1_1/2_*_*
1112 push :
12- branches :
13- - main
13+ branches : [main]
14+ tags : ['*']
1415 paths :
1516 # To check dependencies, run this ( you will need to consider transitive dependencies)
1617 # bake --product PRODUCT -d | grep -v 'docker buildx bake' | jq '.target | keys[]'
1718 - airflow/**
1819 - vector/**
1920 - stackable-base/**
2021 - .github/actions/**
21- - .github/workflows/dev_airflow .yaml
22+ - .github/workflows/build_airflow .yaml
2223
2324jobs :
2425 generate_matrix :
2728 steps :
2829 - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2930 - id : shard
30- uses : stackabletech/actions/shard@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
31+ uses : stackabletech/actions/shard@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
3132 with :
3233 product-name : ${{ env.PRODUCT_NAME }}
3334 outputs :
@@ -50,18 +51,19 @@ jobs:
5051 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5152
5253 - name : Free Disk Space
53- uses : stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
54+ uses : stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
5455
5556 - name : Build Product Image
5657 id : build
57- uses : stackabletech/actions/build-product-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
58+ uses : stackabletech/actions/build-product-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
5859 with :
5960 product-name : ${{ env.PRODUCT_NAME }}
6061 product-version : ${{ matrix.versions }}
6162 build-cache-password : ${{ secrets.BUILD_CACHE_NEXUS_PASSWORD }}
63+ sdp-version : ${{ env.SDP_VERSION }}
6264
6365 - name : Publish Container Image on docker.stackable.tech
64- uses : stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
66+ uses : stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
6567 with :
6668 image-registry-uri : docker.stackable.tech
6769 image-registry-username : github
7173 source-image-uri : localhost/${{ env.PRODUCT_NAME }}:${{ steps.build.outputs.image-manifest-tag }}
7274
7375 - name : Publish Container Image on oci.stackable.tech
74- uses : stackabletech/actions/publish-image@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
76+ uses : stackabletech/actions/publish-image@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
7577 with :
7678 image-registry-uri : oci.stackable.tech
7779 image-registry-username : robot$sdp+github-action-build
9496 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9597
9698 - name : Free Disk Space
97- uses : stackabletech/actions/free-disk-space@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
99+ uses : stackabletech/actions/free-disk-space@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
98100 - name : Publish and Sign Image Index Manifest to docker.stackable.tech
99- uses : stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
101+ uses : stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
100102 with :
101103 image-registry-uri : docker.stackable.tech
102104 image-registry-username : github
@@ -105,10 +107,56 @@ jobs:
105107 image-index-manifest-tag : ${{ matrix.versions }}-stackable0.0.0-dev
106108
107109 - name : Publish and Sign Image Index Manifest to oci.stackable.tech
108- uses : stackabletech/actions/publish-index-manifest@fe921a914283975f3be1f5f47348467a94276d41 # 0.1 .0
110+ uses : stackabletech/actions/publish-index-manifest@a3f7587879e9f12e04a29fd26435949aaa4fd59c # 0.2 .0
109111 with :
110112 image-registry-uri : oci.stackable.tech
111113 image-registry-username : robot$sdp+github-action-build
112114 image-registry-password : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
113115 image-repository : sdp/${{ env.PRODUCT_NAME }}
114116 image-index-manifest-tag : ${{ matrix.versions }}-stackable0.0.0-dev
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",
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 }}"
156+ }
157+ ]
158+ }
159+ ]
160+ }
161+ env :
162+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
0 commit comments