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: remove hardcoded reference to github.com when using reusable remote workflows and remote actions #1784

Merged
merged 3 commits into from
May 3, 2023

Conversation

shubhbapna
Copy link
Contributor

fixes #1588

By removing reference to the hardcoded github.com and instead using serverURL from github context, we can start controlling where we clone these actions/workflows from. So for example if we want act to use ssh then we can simply pass the following option:

--env GITHUB_SERVER_URL=ssh://git@github.com

Moreover, I noticed that for reusable workflows we are cloning the repositories in a directory named - {owner}-{repo}-.github-workflows-{filename}@{ref}. However if we change this directory name to be {owner}-{repo}@{ref}, we will be able to reduce the number of clones act will make when using multiple reusable workflows from the same repository.

@shubhbapna shubhbapna marked this pull request as ready for review May 1, 2023 21:45
@shubhbapna shubhbapna requested a review from a team as a code owner May 1, 2023 21:45
@mergify

This comment was marked as resolved.

@mergify mergify bot added the needs-work Extra attention is needed label May 1, 2023
@mergify

This comment was marked as duplicate.

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #1784 (308edcd) into master (4989f44) will increase coverage by 1.27%.
The diff coverage is 65.22%.

@@            Coverage Diff             @@
##           master    #1784      +/-   ##
==========================================
+ Coverage   61.22%   62.50%   +1.27%     
==========================================
  Files          46       51       +5     
  Lines        7141     8067     +926     
==========================================
+ Hits         4372     5042     +670     
- Misses       2462     2645     +183     
- Partials      307      380      +73     
Impacted Files Coverage Δ
pkg/common/outbound_ip.go 0.00% <0.00%> (ø)
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_pull.go 33.33% <ø> (ø)
pkg/container/docker_run.go 13.58% <0.00%> (-0.01%) ⬇️
pkg/container/docker_volume.go 0.00% <ø> (ø)
pkg/container/file_collector.go 37.30% <0.00%> (ø)
pkg/container/host_environment.go 0.00% <0.00%> (ø)
...ontainer/linux_container_environment_extensions.go 23.07% <0.00%> (-1.25%) ⬇️
pkg/exprparser/functions.go 66.32% <0.00%> (-1.04%) ⬇️
... and 25 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mergify mergify bot removed the needs-work Extra attention is needed label May 2, 2023
Copy link
Member

@KnisterPeter KnisterPeter left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for your contribution.

@mergify mergify bot merged commit 4721abf into nektos:master May 3, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ssh remote workflows (and actions) or using git config
3 participants