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

ci: do not run accessibility checks for bots #1319

Merged
merged 5 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/accessibility-alt-text-bot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
jobs:
accessibility_alt_text_bot:
if: ${{ !endsWith(github.actor, '[bot]') }}
runs-on: ubuntu-latest
steps:
- uses: github/accessibility-alt-text-bot@v1.4.0
Expand Down
2 changes: 2 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflowFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ interface WorkflowFileStep {

interface WorkflowFileOptionsBase {
concurrency?: WorkflowFileConcurrency;
if?: string;
name: string;
on?: WorkflowFileOn;
permissions?: WorkflowFilePermissions;
Expand Down Expand Up @@ -81,6 +82,7 @@ export function createWorkflowFile({
concurrency,
jobs: {
[name.replaceAll(" ", "_").toLowerCase()]: {
...(options.if && { if: options.if }),
"runs-on": "ubuntu-latest",
steps:
"runs" in options
Expand Down
2 changes: 2 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe("createWorkflows", () => {
{
"accessibility-alt-text-bot.yml": "jobs:
accessibility_alt_text_bot:
if: \${{ !endsWith(github.actor, '[bot]') }}
runs-on: ubuntu-latest
steps:
- uses: github/accessibility-alt-text-bot@v1.4.0
Expand Down Expand Up @@ -351,6 +352,7 @@ describe("createWorkflows", () => {
{
"accessibility-alt-text-bot.yml": "jobs:
accessibility_alt_text_bot:
if: \${{ !endsWith(github.actor, '[bot]') }}
runs-on: ubuntu-latest
steps:
- uses: github/accessibility-alt-text-bot@v1.4.0
Expand Down
1 change: 1 addition & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function createWorkflows(options: Options) {
}),
}),
"accessibility-alt-text-bot.yml": createWorkflowFile({
if: "${{ !endsWith(github.actor, '[bot]') }}",
name: "Accessibility Alt Text Bot",
on: {
issue_comment: {
Expand Down
Loading