Skip to content

Commit 8217d8e

Browse files
committed
upload artifact in case of failure
1 parent f1ff1d4 commit 8217d8e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,33 @@ jobs:
5252
AWS_DEFAULT_REGION: us-east-1
5353
AWS_ACCESS_KEY_ID: test
5454
AWS_SECRET_ACCESS_KEY: test
55+
56+
- name: Show localstack logs
57+
if: always()
58+
run: |
59+
localstack logs
60+
61+
- name: Send a Slack notification
62+
if: failure() || github.event_name != 'pull_request'
63+
uses: ravsamhq/notify-slack-action@v2
64+
with:
65+
status: ${{ job.status }}
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
notification_title: "{workflow} has {status_message}"
68+
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
69+
footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow run>"
70+
notify_when: "failure"
71+
env:
72+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
73+
74+
- name: Generate a Diagnostic Report
75+
if: failure()
76+
run: |
77+
curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz
78+
79+
- name: Upload the Diagnostic Report
80+
if: failure()
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: diagnose.json.gz
84+
path: ./diagnose.json.gz

0 commit comments

Comments
 (0)