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

Github Actions CI snippet broken #20958

Closed
1 of 4 tasks
luuktap opened this issue Dec 30, 2023 · 4 comments · Fixed by #22652
Closed
1 of 4 tasks

Github Actions CI snippet broken #20958

luuktap opened this issue Dec 30, 2023 · 4 comments · Fixed by #22652
Assignees
Labels
community This is a good first issue for contributing outdated scope: misc Misc issues type: docs

Comments

@luuktap
Copy link

luuktap commented Dec 30, 2023

Documentation issue

  • Reporting a typo
  • Reporting a documentation bug
  • Documentation improvement
  • Documentation feedback

Is there a specific documentation page you are reporting?

Github Actions CI Documentation

Additional context or description

When running this CI snippet on a pull request, it passes. However, when running it on the main branch, it fails.

First of all, the nrwl/nx-set-shas task throws the error Resource not accessible by integration. This can be fixed by adding permission overrides as described in nrwl/nx-set-shas#89

After that git branch --track main origin/main throws an error.
image

@AgentEnder AgentEnder added the scope: misc Misc issues label Jan 9, 2024
@stefannew
Copy link

Has anyone been able to work around this? I'm hitting the same error.

@BadMachine
Copy link

4 months. Still nothing?

@kkamman
Copy link

kkamman commented Mar 31, 2024

I added an if conditional as a workaround, to only trigger the step if it's running for a PR:

  - run: git branch --track main origin/main
    if: ${{ github.event_name == 'pull_request' }}

EDIT: Just noticed this was already mentioned here #22584

Copy link

github-actions bot commented May 5, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community This is a good first issue for contributing outdated scope: misc Misc issues type: docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants