Skip to content

Commit 4237c04

Browse files
committed
feat: enhance CI/CD workflow with Docker caching and Slack notifications on failure
1 parent 7fab2a5 commit 4237c04

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ jobs:
7474
context: .
7575
push: true
7676
tags: ${{ steps.meta.outputs.tags }}
77+
# Added Docker caching for faster builds
78+
cache-from: type=gha
79+
cache-to: type=gha,mode=max
7780

7881
- name: Deployment notification
7982
run: |
@@ -85,6 +88,8 @@ jobs:
8588
} >> "$GITHUB_STEP_SUMMARY"
8689
8790
- name: Slack notification
91+
# Added if: always() to ensure notifications are sent on failure as well
92+
if: always()
8893
env:
8994
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9095
STATUS: ${{ job.status }}
@@ -98,4 +103,4 @@ jobs:
98103
fi
99104
curl -sS -X POST -H "Content-Type: application/json" \
100105
--data "{\"text\":\":rocket: CI/CD ${STATUS}\nRepo: ${{ github.repository }}\nImage: ${IMAGE}\nCommit: ${SHA}\nRun: ${RUN_URL}\"}" \
101-
"$SLACK_WEBHOOK_URL"
106+
"$SLACK_WEBHOOK_URL"

0 commit comments

Comments
 (0)