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

Various improvements #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

peternewman
Copy link

No description provided.

@@ -63,13 +64,18 @@

github_user = github_repo.split('/')[0]
github_slug = github_repo.split('/')[1]

git_working_folder = github_slug + "-" + gh_branch
Copy link
Author

Choose a reason for hiding this comment

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

I think I was having issues with it trying to commit into the same path as the existing checkout was in (which was a different branch).

Comment on lines -71 to +78
'https://{}@github.com/{}.git'.format(github_token, github_repo),
github_slug,
'https://x-access-token:{}@github.com/{}.git'.format(github_token, github_repo),
git_working_folder,
Copy link
Author

Choose a reason for hiding this comment

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

This means you can just use a bog standard ${{ secrets.GITHUB_TOKEN }} and you don't have to have a special personal access token or anything.

I can give this a new input name and check for either if you'd rather for backwards compatibility?

Copy link
Owner

@jrandiny jrandiny Apr 1, 2021

Choose a reason for hiding this comment

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

I forget why, however I'm pretty sure I have tried using GitHub token and failed (some permission error i forgot). I will try it again when I have the time, maybe GitHub have fix the problem

Copy link
Author

Choose a reason for hiding this comment

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

@AlexTMjugador
Copy link

Is there any reason why this PR is still a draft? The changes look good, and I look forward to see them merged.

@peternewman peternewman marked this pull request as ready for review August 16, 2021 13:14
@peternewman
Copy link
Author

Is there any reason why this PR is still a draft? The changes look good, and I look forward to see them merged.

I think at the time I hadn't used it, but there's a WIP PR making use of it here (the apt bit is fine, just some other tidying up to do there):
mjemmeson/Date-Holidays-GB#14

I'm not sure if the x-access-token bit would be a breaking change, or if some filenames could be valid on their own, but not when globbed e.g. foo[abc]bar.deb, but they're probably fairly low risk.

@barnumbirr
Copy link

Wondering if this action could be extended to be triggered in repository A to publish the .deb files in repository B. 🤔
This would allow users to generate a central APT repository within their account.

@peternewman
Copy link
Author

Wondering if this action could be extended to be triggered in repository A to publish the .deb files in repository B.
This would allow users to generate a central APT repository within their account.

@barnumbirr you probably want to raise this as an issue, rather than a comment on my PR.

However you can already do at least part of that, if you look at https://github.com/mjemmeson/Date-Holidays-GB/blob/master/.github/workflows/test.yml I'm building https://github.com/jonasbn/perl-date-holidays-super within my repo. In that case I'm fetching it via CPAN (a perl tool), but a git clone would work too. So you could certainly build on a regular basis within B and publish from there. Whether you can build based on a commit in A and publish to B probably depends on the token scope, it may well be possible.

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.

4 participants