Skip to content

Conversation

@nzakas
Copy link
Member

@nzakas nzakas commented Nov 18, 2025

Prerequisites checklist

What is the purpose of this pull request?

To make the update-baseline workflow run CI when opened.

What changes did you make? (Give an overview)

I switched the workflow to use our GitHub Bot app to create the PR instead of the default workflow user. This should trigger the other workflows to run correctly.

Note: BOT_APP_PRIVATE_KEY is only enabled for this repo. To do the same thing in other repos, we'd need to add access for those repos.

Reference:
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Related Issues

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Nov 18, 2025
@nzakas nzakas requested a review from lumirlumir November 18, 2025 15:52
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Nov 19, 2025
@lumirlumir lumirlumir moved this from Needs Triage to Triaging in Triage Nov 19, 2025
Copy link
Member

@lumirlumir lumirlumir left a comment

Choose a reason for hiding this comment

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

Thanks for taking a look at this issue!

I investigated and manually triggered the workflow on the auto-pr-fix branch, but it encountered some errors:

https://github.com/eslint/css/actions/runs/19489195700/job/55777962002

Image

It seems there are errors like the following:

  • Inputs 'owner' and 'repositories' are not set.
  • Failed to create token for "css" (attempt 1): [universal-github-app-jwt] Private Key is in OpenSSH format, but only PKCS#8 is supported.

For other reviewers' convenience, here are some additional references:

@lumirlumir lumirlumir moved this from Triaging to Implementing in Triage Nov 19, 2025
@lumirlumir lumirlumir requested a review from a team November 19, 2025 04:04
@lumirlumir
Copy link
Member

lumirlumir commented Nov 19, 2025

I think another possible way to make the CI work would be to simply use WORKFLOW_PUSH_BOT_TOKEN, which the update-readme workflow uses:

workflow_push_bot_token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}

Maybe the final workflow will look like this:

name: Update baseline
on:
    workflow_dispatch:
    schedule:
        - cron: "0 0 * * 0" # Runs every Sunday at midnight UTC

jobs:
    update-baseline:
# If the `WORKFLOW_PUSH_BOT_TOKEN` has `contents: write` and `pull-requests: write` permissions, it's no longer needed.
#        permissions:
#            contents: write
#            pull-requests: write    
    
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v5
            - name: Setup Node.js
              uses: actions/setup-node@v5
              with:
                  node-version: "lts/*"

            - name: Install dependencies
              run: npm install

            - name: Update baseline packages
              run: npm install -D mdn-data@latest web-features@latest

            - name: Generate baseline data
              run: npm run build:baseline

            - name: Create Pull Request
              uses: peter-evans/create-pull-request@v7
              with:
                  token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}
                  commit-message: "fix: update baseline data"
                  title: "fix: update baseline data"
                  branch: update-baseline-data
                  branch-suffix: timestamp
                  body: |
                      Updates baseline data using the latest versions of mdn-data and web-features.

                      This PR is autogenerated by the "Update Baseline" GitHub Action.

I've tested this workflow in my forked repository: https://github.com/lumirlumir/fork-css/pulls

Before using WORKFLOW_PUSH_BOT_TOKEN: The CI is not working.

image

After using WORKFLOW_PUSH_BOT_TOKEN: The CI is working correctly.

image

@nzakas
Copy link
Member Author

nzakas commented Nov 19, 2025

Yeah, I think that's a good suggestion. I'll update to do that.

Copy link
Member

@lumirlumir lumirlumir left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Actually, I'm not 100% sure whether it's working in the eslint/css repository, but since the following tests were successful, I'll try to merge it.

@lumirlumir lumirlumir merged commit d3d0e4a into main Nov 20, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Nov 20, 2025
@lumirlumir lumirlumir deleted the auto-pr-fix branch November 20, 2025 11:24
@lumirlumir
Copy link
Member

It seems that everything is working as expected 🎉

#332

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion build

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants