Skip to content

Add a reusable status_embed workflow#17

Closed
shtlrs wants to merge 2 commits into
python-discord:mainfrom
shtlrs:add-status-embed-workflow
Closed

Add a reusable status_embed workflow#17
shtlrs wants to merge 2 commits into
python-discord:mainfrom
shtlrs:add-status-embed-workflow

Conversation

@shtlrs
Copy link
Copy Markdown
Contributor

@shtlrs shtlrs commented Feb 14, 2023

As a continuation to this PR, we now want all of our repositories that need the status_embed workflow to use a centralized reusable workflow.

We've decided to add it to this repo and have it referenced by all of our other repositories that need to trigger it upon linting, building, etc.

NOTE
the GHA_WEBHOOK_TOKEN secret needs to be part of this repository in order for it to be reusable all over.

@shtlrs shtlrs changed the title Add status_embed workflow Add a reusable status_embed workflow Feb 14, 2023
Comment thread .github/workflows/status_embed.yaml Outdated
uses: SebastiaanZ/github-status-embed-for-discord@v0.2.1
with:
# Our GitHub Actions webhook
webhook_id: '784184528997842985'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be an input, so the caller can determine what channel it gets sent to

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think setting it as a variable is better, that way we'd avoid having the with statements scattered all over the over workflows that'll call this one.

At worst, we can have it as an input, and default to the variable. But shouldn't be needed in our case

#
# 3. If any workflow ends in failure or was cancelled.
if: >-
(github.workflow == 'Deploy' && ${{ inputs.job_status }} != 'skipped') ||
Copy link
Copy Markdown
Member

@ChrisLovering ChrisLovering Feb 14, 2023

Choose a reason for hiding this comment

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

The Deploy name here won't be the same on all repos. We should make this an input, or standardise the name across our repos as part of the work to use this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How about we go for the standardization option?

@shtlrs
Copy link
Copy Markdown
Contributor Author

shtlrs commented Mar 14, 2023

Unfortunately, this won't work out currently due to how contexts are passed from forks.
I'll be closing this for now until we find a more suitable solution.

@shtlrs shtlrs closed this Mar 14, 2023
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