Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add report CI errors github action #1729

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

kentsanggds
Copy link
Contributor

Add a custom github action to make it easier to send CI errors to a team channel with some notes on how to use the action.

@kentsanggds kentsanggds requested a review from a team February 26, 2025 18:48
@AgaDufrat AgaDufrat self-requested a review February 27, 2025 10:28
Comment on lines 7 to 17
name: Always failing job
on:
workflow_dispatch:

jobs:
failed-run:
name: Failed run
runs-on: ubuntu-22.04
steps:
- name: Always failing
run: exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use a real use case example here like name: Deploy. This is how the workflow can be tested so might be a bit confusing/unhelpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code here is just for showing where the code is inserted and used rather than being a demonstration of a use case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a note to state where the action might be typically used

Copy link
Contributor

@AgaDufrat AgaDufrat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test looks good.

I left a few comments. I’d give it more general name and message. We should try to scope it to main branch.

@@ -0,0 +1,26 @@
## Pre-requisites

You will need to get the slack webhook url from the secrets manager first and add it as SLACK_WEBHOOK_URL as a repository secret.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to move away from ClickOpsing GitHub config so ideally it should be added in the Terraform config. Similar to organisations secrets https://github.com/alphagov/govuk-infrastructure/blob/main/terraform/deployments/github/main.tf#L224-L253

As per our chat on Slack: https://gds.slack.com/archives/C079ULB1UEP/p1740663568473939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants