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

Support GitHub Apps for GitOps Workflow #243

Merged
merged 1 commit into from Apr 24, 2024

Conversation

0x46616c6b
Copy link
Contributor

Type of Change

  • Bugfix
  • Enhancement / new feature
  • Refactoring
  • Documentation

Description

  • Support GitHub Apps for GitOps Workflow

Checklist

  • Add relevant labels (for example type of change or patch/minor/major)
  • Make sure not to introduce some mistakes
  • Update documentation
  • Review the Contributing Guideline and sign CLA
  • Reference relevant issue(s) and close them after merging

@0x46616c6b 0x46616c6b added the minor Pull requests with new features label Apr 24, 2024
@0x46616c6b 0x46616c6b requested a review from a team as a code owner April 24, 2024 13:01
steps:
- name: Checkout
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why we need the actions/checkout here

Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to start the action, you want to get the code of the repo where you execute this action. In this repo, you have the Dockerfile, etc. Without this action, you will get a not-found exception for several files. 😆 If you are unsure, feel free to test your solution. You can use the branch name as your new version. 🙌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense. I totally forgot that the workflow replaces the entire job content where normally the checkout happens.

@0x46616c6b 0x46616c6b force-pushed the Support-GitHub-Apps-for-GitOps-Workflow branch 2 times, most recently from 51d812d to 52c718c Compare April 24, 2024 13:07
@flaxel flaxel added the enhancement New feature or request label Apr 24, 2024
Comment on lines +139 to +140
# optional: organization of the gitops repository, default: github.repository_owner
gitops-organization: <your-organization>
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of interest: What is a use case where this should differ? 🤔

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 actions/create-github-app-token action needs an owner to set the correct scope for the token. Otherwise, the token is only granted for the current repository. But you want to push to another repository (inside of your organization). Therefore, you need to be able to configure them. Otherwise, people outside of Staffbase can't use that workflow.

steps:
- name: Checkout
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to start the action, you want to get the code of the repo where you execute this action. In this repo, you have the Dockerfile, etc. Without this action, you will get a not-found exception for several files. 😆 If you are unsure, feel free to test your solution. You can use the branch name as your new version. 🙌

@0x46616c6b 0x46616c6b force-pushed the Support-GitHub-Apps-for-GitOps-Workflow branch from 52c718c to 0b772bf Compare April 24, 2024 13:37
@0x46616c6b 0x46616c6b merged commit 58e3402 into main Apr 24, 2024
2 checks passed
@0x46616c6b 0x46616c6b deleted the Support-GitHub-Apps-for-GitOps-Workflow branch April 24, 2024 13:52
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request minor Pull requests with new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants