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

fix(ci): Use 1Password-bot token for flake update PRs so approval job runs #465

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrjones2014
Copy link
Member

@mrjones2014 mrjones2014 commented May 17, 2024

Overview

Changes the token used for the flake update CI jobs to use the 1Password-bot users token, so that the approval job runs and github-actions[bot] can apply an approval to the flake.lock update PRs.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

How To Test

Merge this change, then run a flake.lock update CI job. The PR should be created by 1Password-bot, and github-actions[bot] should provide one approval for it.

Changelog

Use 1Password-bot instead of github-actions[bot] to run the flake.lock update CI jobs.

@@ -17,7 +17,7 @@ jobs:
run: nix flake update
- name: Create signed commit with flake.lock changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.OP_BOT_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Sanity check: Who is 1Password bot? Did you create a Github account specifically for creating these PRs? I saw that our IT team added the token to this repo's variables but I was curious whether you know what permissions we used for that token?

Question: I see how this action will now use the 1Password bot to create the PRs, but I'm missing the part where the GitHub actions bot is called upon for approving.

Copy link
Member Author

Choose a reason for hiding this comment

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

The 1Password-bot is a user, I think controlled by IT, it's also used in the 1Password for Open Source repo for some automations relating to application approvals.

The GitHub Actions bot applies the approval via a separate job, which was introduced here: #456

The issue is just that that job is never running currently, because PRs created by GitHub Actions bot do not trigger further CI actions. Switching to the 1Password-bot token should make it so that the flake.lock PRs still trigger GitHub Actions, and that other job will run, and GitHub Actions bot will apply an approval.

@mrjones2014 mrjones2014 changed the title fix(ci): Use 1Password-bot token for flake update PRs so approval job… fix(ci): Use 1Password-bot token for flake update PRs so approval job runs May 23, 2024
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