Skip to content

Commit 72b0d49

Browse files
authored
ci: Use send-slack-notification action (#1111)
* ci: Bump actions/checkout to 4.2.2 * ci: Bump stackabletech/actions to 0.8.1 * ci: Use stackabletech/actions/send-slack-notification action
1 parent 037b97d commit 72b0d49

File tree

5 files changed

+26
-56
lines changed

5 files changed

+26
-56
lines changed

.github/workflows/mirror.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- amd64
3737
- arm64
3838
steps:
39-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
39+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4040
with:
4141
persist-credentials: false
4242

@@ -57,7 +57,7 @@ jobs:
5757
echo "IMAGE_REPOSITORY=$(.scripts/get_repo_name.sh)" | tee -a "$GITHUB_ENV"
5858
5959
- name: Publish Container Image on oci.stackable.tech
60-
uses: stackabletech/actions/publish-image@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
60+
uses: stackabletech/actions/publish-image@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
6161
with:
6262
image-registry-uri: oci.stackable.tech
6363
image-registry-username: robot$sdp+github-action-build
@@ -73,7 +73,7 @@ jobs:
7373
id-token: write
7474
runs-on: ubuntu-latest
7575
steps:
76-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
76+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7777
with:
7878
persist-credentials: false
7979

@@ -84,14 +84,17 @@ jobs:
8484
echo "IMAGE_REPOSITORY=$(.scripts/get_repo_name.sh)" | tee -a "$GITHUB_ENV"
8585
8686
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
87-
uses: stackabletech/actions/publish-index-manifest@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
87+
uses: stackabletech/actions/publish-index-manifest@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
8888
with:
8989
image-registry-uri: oci.stackable.tech
9090
image-registry-username: robot$sdp+github-action-build
9191
image-registry-password: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
9292
image-repository: ${{ format('sdp/{0}', env.IMAGE_REPOSITORY) }}
9393
image-index-manifest-tag: ${{ inputs.image-index-manifest-tag }}
9494

95+
# NOTE (@Techassi) It is currently not possible to use our own action here, because the inputs
96+
# assume it is used to report on image build results, not mirror results. The action needs to be
97+
# adjusted to support other use-cases.
9598
notify:
9699
name: Failure Notification
97100
needs: [mirror-image, publish_manifests]

.github/workflows/pr_pre-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
pre-commit:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616
with:
1717
persist-credentials: false
1818
fetch-depth: 0
19-
- uses: stackabletech/actions/run-pre-commit@320eae677555385b3d40e1c3a81d9263b72742e4 # 0.6.0
19+
- uses: stackabletech/actions/run-pre-commit@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
2020
with:
2121
python-version: ${{ env.PYTHON_VERSION }}
2222
hadolint: ${{ env.HADOLINT_VERSION }}

.github/workflows/preflight.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
env:
7575
GITHUB_REF_NAME: ${{ github.ref_name }}
7676
steps:
77-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
77+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7878
with:
7979
persist-credentials: false
8080
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0

.github/workflows/reusable_build_image.yaml

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
name: Generate Version List
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
with:
2828
persist-credentials: false
2929
- id: shard
30-
uses: stackabletech/actions/shard@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0
30+
uses: stackabletech/actions/shard@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
3131
with:
3232
product-name: ${{ inputs.product-name }}
3333
outputs:
@@ -48,23 +48,23 @@ jobs:
4848
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
4949
steps:
5050
- name: Checkout Repository
51-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5252
with:
5353
persist-credentials: false
5454

5555
- name: Free Disk Space
56-
uses: stackabletech/actions/free-disk-space@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0
56+
uses: stackabletech/actions/free-disk-space@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
5757

5858
- name: Build Product Image
5959
id: build
60-
uses: stackabletech/actions/build-product-image@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0
60+
uses: stackabletech/actions/build-product-image@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
6161
with:
6262
product-name: ${{ inputs.product-name }}
6363
product-version: ${{ matrix.versions }}
6464
sdp-version: ${{ inputs.sdp-version }}
6565

6666
- name: Publish Container Image on oci.stackable.tech
67-
uses: stackabletech/actions/publish-image@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0
67+
uses: stackabletech/actions/publish-image@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
6868
with:
6969
image-registry-uri: oci.stackable.tech
7070
image-registry-username: robot$${{ inputs.registry-namespace }}+github-action-build
@@ -85,12 +85,12 @@ jobs:
8585
versions: ${{ fromJson(needs.generate_matrix.outputs.versions) }}
8686
steps:
8787
- name: Checkout Repository
88-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
88+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8989
with:
9090
persist-credentials: false
9191

9292
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
93-
uses: stackabletech/actions/publish-index-manifest@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # 0.7.0
93+
uses: stackabletech/actions/publish-index-manifest@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # 0.8.1
9494
with:
9595
image-registry-uri: oci.stackable.tech
9696
image-registry-username: robot$${{ inputs.registry-namespace }}+github-action-build
@@ -102,44 +102,11 @@ jobs:
102102
name: Failure Notification
103103
needs: [generate_matrix, build, publish_manifests]
104104
runs-on: ubuntu-latest
105-
if: failure()
105+
if: failure() || github.run_attempt > 1
106106
steps:
107-
- uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
107+
- name: Send Notification
108+
uses: stackabletech/actions/send-slack-notification@55d2f9fcbcd7884ac929ea65fd6f069e7b7a49d2 # v0.8.1
108109
with:
109-
channel-id: "C07UG6JH44F" # notifications-container-images
110-
payload: |
111-
{
112-
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
113-
"attachments": [
114-
{
115-
"pretext": "See the details below for a summary of which job(s) failed.",
116-
"color": "#aa0000",
117-
"fields": [
118-
{
119-
"title": "Generate Version List",
120-
"short": true,
121-
"value": "${{ needs.generate_matrix.result }}"
122-
},
123-
{
124-
"title": "Build/Publish Image",
125-
"short": true,
126-
"value": "${{ needs.build.result }}"
127-
},
128-
{
129-
"title": "Build/Publish Manifests",
130-
"short": true,
131-
"value": "${{ needs.publish_manifests.result }}"
132-
}
133-
],
134-
"actions": [
135-
{
136-
"type": "button",
137-
"text": "Go to workflow run",
138-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
139-
}
140-
]
141-
}
142-
]
143-
}
144-
env:
145-
SLACK_BOT_TOKEN: ${{ secrets.slack-token }}
110+
publish-manifests-result: ${{ needs.publish_manifests.result }}
111+
build-result: ${{ needs.build.result }}
112+
slack-token: ${{ secrets.slack-token }}

.github/workflows/ubi-rust-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
ubi-version: ["ubi9"]
2323
runs-on: ${{ matrix.runner }}
2424
steps:
25-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
with:
2727
persist-credentials: false
2828
- name: Login to Stackable Harbor
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-latest
6464
needs: ["build"]
6565
steps:
66-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
66+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6767
with:
6868
persist-credentials: false
6969
- name: Login to Stackable Harbor

0 commit comments

Comments
 (0)