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

Cannot point to other branches #59

Closed
bltavares opened this issue Apr 24, 2019 · 5 comments
Closed

Cannot point to other branches #59

bltavares opened this issue Apr 24, 2019 · 5 comments
Labels
area/action Relating to running an action kind/bug Something isn't working stale

Comments

@bltavares
Copy link

bltavares commented Apr 24, 2019

First of all, thanks a lot for the project. It is super useful.

It seems like act clone is not bringing in the branches. My workflow is to create a branch on my actions repo, and test it from another project, before it lands on master.

The error is the following:

[setup dependencies] git clone 'https://github.com/bltavares/actions' # ref=bash
[setup dependencies]   cloning https://github.com/bltavares/actions to /var/folders/3l/gmb8fzc51qsg2mf4426vn80c0000gn/T/act/bltavares/actions/bash@bash
[setup dependencies] Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.ts:  14% (1/7)
Compressing objects: 100% (7/7), done.ts:  14% (1/7)
[setup dependencies] Total 1435 (delta 0), reused 5 (delta 0), pack-reused 1428
[setup dependencies] Cloned https://github.com/bltavares/actions to /var/folders/3l/gmb8fzc51qsg2mf4426vn80c0000gn/T/act/bltavares/actions/bash@bash
[setup dependencies] Unable to resolve bash: reference not found
DEBU[0002] reference not found

After I run git fetch && git checkout on the repo used to clone it worked, with an warning:

[setup dependencies] git clone 'https://github.com/bltavares/actions' # ref=bash
[setup dependencies] Unable to pull refs/heads/bash: non-fast-forward update

Example workflow

workflow "validate PRs" {
  on = "push"
  resolves = ["setup dependencies"]
}

action "setup dependencies" {
  uses = "bltavares/actions/bash@bash"
  args = ["echo 1"]
}

I might be able to check it at some point, but I'm not able to do this on the following weeks.

@TimonVS
Copy link

TimonVS commented Apr 26, 2019

I'm running into the same issue. @bltavares can you explain in a bit more detail how you got it to work? Where do I run git fetch && git checkout?

@TimonVS
Copy link

TimonVS commented Apr 26, 2019

Figured it out. As a temporary workaround:

  1. In your terminal go to the act directory within the temp directory of your OS (see: https://golang.org/pkg/os/#TempDir), then navigate to the repository (in my case cd $TMPDIR/act/toolmantim/release-drafter)
  2. Once in the directory run: git fetch && git checkout <branch name>
  3. Run act again

@bltavares
Copy link
Author

That was what I've done. Running act -v you get the temp folder name and update the repository to the correct branch

@chrisduong
Copy link

We need to be able to use Action at specific Version also. For e.g. I cannot define this in my Workflow.

- uses: 8398a7/action-slack@v2
[Publish/Publish chart] ⭐  Run 8398a7/action-slack@v2
[Publish/Publish chart]   ☁  git clone 'https://github.com/8398a7/action-slack' # ref=v2
[Publish/Publish chart] Unable to resolve v2: reference not found
[Publish/Publish chart]   ❌  Failure - 8398a7/action-slack@v2

@cplee
Copy link
Contributor

cplee commented Feb 26, 2020

See #101 (comment)

Ideally, @8398a7 could update the action to follow recommended versioning

@cplee cplee added kind/bug Something isn't working kind/question Further information is requested area/action Relating to running an action and removed kind/question Further information is requested labels Feb 27, 2020
@cplee cplee added the stale label Mar 10, 2020
makrsmark pushed a commit to makrsmark/act that referenced this issue Aug 3, 2023
- Fix https://gitea.com/gitea/act_runner/issues/220
ignore `--network` and `--net` in `options`.
- Fix https://gitea.com/gitea/act_runner/issues/222
add opts of `mergo.WithAppendSlice` when excute `mergo.Merge()`.

Reviewed-on: https://gitea.com/gitea/act/pulls/59
Reviewed-by: Zettat123 <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/action Relating to running an action kind/bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants