Skip to content

Commit e64fe81

Browse files
committed
SCF-788: Removed slack notifications for now
1 parent 50858ff commit e64fe81

File tree

1 file changed

+2
-41
lines changed

1 file changed

+2
-41
lines changed

.github/workflows/build-and-push.yml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
name: Build and Push Docker Images to Harbor
3535
runs-on: ubuntu-latest
3636
timeout-minutes: 60
37-
env:
38-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
3937
steps:
4038
- name: Checkout Repository
4139
uses: actions/checkout@v4
@@ -48,7 +46,8 @@ jobs:
4846
else
4947
FULL_SHA="${{ github.sha }}"
5048
SHORT_SHA="${FULL_SHA:0:7}"
51-
echo "tags=${FULL_SHA},${SHORT_SHA}" >> $GITHUB_OUTPUT
49+
BRANCH_NAME="${{ github.ref_name }}"
50+
echo "tags=${BRANCH_NAME},${FULL_SHA},${SHORT_SHA}" >> $GITHUB_OUTPUT
5251
fi
5352
5453
- name: Generate Harbor tags
@@ -106,16 +105,6 @@ jobs:
106105
cache-from: type=gha
107106
cache-to: type=gha,mode=max
108107

109-
- name: Notify Slack on operator build failure
110-
if: steps.build_operator.outcome == 'failure'
111-
uses: rtCamp/action-slack-notify@master
112-
env:
113-
SLACK_USERNAME: 'GitHub Actions'
114-
SLACK_ICON_EMOJI: ':x:'
115-
SLACK_COLOR: '#FF0000'
116-
SLACK_TITLE: 'Postgres Operator image build failed'
117-
SLACK_MESSAGE: 'Failed to build `postgres-operator` image with tags `${{ steps.tags.outputs.tags }}`. Please check the workflow logs for details.'
118-
119108
- name: Build and push logical-backup image
120109
id: build_logical_backup
121110
uses: docker/build-push-action@v7
@@ -128,31 +117,3 @@ jobs:
128117
cache-from: type=gha
129118
cache-to: type=gha,mode=max
130119

131-
- name: Notify Slack on logical-backup build failure
132-
if: steps.build_logical_backup.outcome == 'failure'
133-
uses: rtCamp/action-slack-notify@master
134-
env:
135-
SLACK_USERNAME: 'GitHub Actions'
136-
SLACK_ICON_EMOJI: ':x:'
137-
SLACK_COLOR: '#FF0000'
138-
SLACK_TITLE: 'Logical-backup image build failed'
139-
SLACK_MESSAGE: 'Failed to build `postgres-operator/logical-backup` image with tags `${{ steps.tags.outputs.tags }}`. Please check the workflow logs for details.'
140-
141-
- name: Check for build failures
142-
if: steps.build_operator.outcome == 'failure' || steps.build_logical_backup.outcome == 'failure'
143-
run: exit 1
144-
145-
- name: Notify Slack - Success
146-
if: success()
147-
uses: rtCamp/action-slack-notify@master
148-
env:
149-
SLACK_USERNAME: 'GitHub Actions'
150-
SLACK_ICON_EMOJI: ':rocket:'
151-
SLACK_COLOR: '#3278BD'
152-
SLACK_TITLE: 'Images deployed to Harbor'
153-
SLACK_MESSAGE: |
154-
Postgres Operator images pushed with tags `${{ steps.tags.outputs.tags }}`.
155-
Operator: ${{ vars.HARBOR_ORG }}/scalefield/postgres-operator
156-
Logical-backup: ${{ vars.HARBOR_ORG }}/scalefield/postgres-operator/logical-backup
157-
Harbor: https://containers.cybertec.at/harbor/projects/3/repositories/postgres-operator/artifacts-tab
158-

0 commit comments

Comments
 (0)