Visitar URL original
feat(#586): Using multiple tokens for private GitHub Repo connectivity by alexvanderberkel · Pull Request #598 · AndreasAugustin/actions-template-sync · GitHub
Skip to content

feat(#586): Using multiple tokens for private GitHub Repo connectivity - #598

Merged
AndreasAugustin merged 194 commits into
AndreasAugustin:mainfrom
alexvanderberkel:main
Jan 31, 2025
Merged

AndreasAugustin merged 194 commits into
AndreasAugustin:mainfrom
alexvanderberkel:main

Conversation

@alexvanderberkel

@alexvanderberkel alexvanderberkel commented Jan 8, 2025 •

Copy link
Copy Markdown
Contributor

Description

Part of #586

This PR is helping to allow synchronization by using the specific github app token for GitHub organizations for pulling changes. The push needs to use the token of the pipeline which will have permission in the target repository where the action is running on.

  • fix: 🐛 issue with AUTHN and AUTHZ
  • feat: ✨ preparations to be able to have target repository in another org/repository

Remark

For automation please see closing-issues-using-keywords

@AndreasAugustin AndreasAugustin self-assigned this Jan 8, 2025
@AndreasAugustin AndreasAugustin added the enhancement New feature or request label Jan 8, 2025
Signed-off-by: Andy Augustin <dev@andreas-augustin.org>
@AndreasAugustin

Copy link
Copy Markdown
Owner

Hi @alexvanderberkel and thanks a bunch for the PR! Highly appreciated. Unfortunately I think your changes are not fully working because I think we need to do a logout from the source and a login to the target.
Therefore I built a small change here (currently a draft for discussion and it is not fully working yet): https://github.com/alexvanderberkel/actions-template-sync/pull/1/files

alexvanderberkel and others added 19 commits January 10, 2025 15:46
…g logout command in entrypoint.sh and sync_template.sh

@AndreasAugustin AndreasAugustin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks again @alexvanderberkel for your work <3

Comment thread action.yml Outdated
Comment thread src/entrypoint.sh Outdated
Comment thread src/sync_template.sh Outdated
Comment thread src/sync_template.sh Outdated
Alex Esseling and others added 16 commits January 30, 2025 13:50
…test

Set is_dry_run to false in GitHub app target organization test workflow
@alexvanderberkel

Copy link
Copy Markdown
Contributor Author

@AndreasAugustin I made progress today. It works if the target_repo is the same as where the action runs. If that deviates the sync action still wants to merge it in the same repo where the run is happening. Looks like a bit more work to allow the sync to another target organization. See this PR for the work alexvanderberkel#20

@AndreasAugustin

Copy link
Copy Markdown
Owner

@AndreasAugustin I made progress today. It works if the target_repo is the same as where the action runs. If that deviates the sync action still wants to merge it in the same repo where the run is happening. Looks like a bit more work to allow the sync to another target organization. See this PR for the work alexvanderberkel#20

great! Will check it out today night.
Let's put the option to be able to even sync into another target repo into a new feature and new PR.

Comment thread .github/workflows/test_github_app _target_org.yml Outdated
env:
MY_VAR: "bar"
with:
source_repo_path: alexvanderberkel/private-test-repo

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I need to modify this a bit and use a own token.
Will prepare the needed things.

Comment thread .github/workflows/test.yml Outdated
@AndreasAugustin AndreasAugustin changed the title Using multiple tokens for private GitHub Repo connectivity feat(#598): Using multiple tokens for private GitHub Repo connectivity Jan 31, 2025
@AndreasAugustin
AndreasAugustin merged commit 3247499 into AndreasAugustin:main Jan 31, 2025
AndreasAugustin added a commit that referenced this pull request Jan 31, 2025
disable missing/not working test (missing tokens/test file)

Signed-off-by: Andy Augustin <dev@andreas-augustin.org>
@AndreasAugustin AndreasAugustin changed the title feat(#598): Using multiple tokens for private GitHub Repo connectivity feat(#586): Using multiple tokens for private GitHub Repo connectivity Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants