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

action-template-sync failing #168

Closed
fabriziocacicia opened this issue Apr 15, 2022 · 6 comments · Fixed by #170
Closed

action-template-sync failing #168

fabriziocacicia opened this issue Apr 15, 2022 · 6 comments · Fixed by #170
Assignees
Labels
bug Something isn't working

Comments

@fabriziocacicia
Copy link

Describe the bug
To describe the bug I'm reporting the logs of the Action:

+++ git ls-remote ***github.com/fabriziocacicia/template_base HEAD
+++ awk '{print $1}'
++ TEMPLATE_REMOTE_GIT_HASH=28ad6a0acfbf[39](https://github.com/fabriziocacicia/template_base_dart/runs/6035601769?check_suite_focus=true#step:4:39)f4f0fd0a9fed54eb9de43b5581
+++ git rev-parse --short 28ad6a0acfbf39f4f0fd0a9fed54eb9de43b5581
fatal: unsafe repository ('/github/workspace' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory /github/workspace
++ NEW_TEMPLATE_GIT_HASH=

To Reproduce
Just manually running the Action configured with this yaml file

Possible solution
I think actions/checkout#766 could be a possible cause, and this rht/zulip-archive@2957a94 a possible solution

@fabriziocacicia fabriziocacicia changed the title action-template-fix failing action-template-sync failing Apr 15, 2022
@github-actions
Copy link
Contributor

Hi! Thank you for your contribution!'Happy coding! 🚀

@AndreasAugustin
Copy link
Owner

Hi @fabriziocacicia thanks for the bug report.
I will have a look into it within the next days.

@AndreasAugustin AndreasAugustin added the bug Something isn't working label Apr 16, 2022
@AndreasAugustin AndreasAugustin self-assigned this Apr 16, 2022
@AndreasAugustin
Copy link
Owner

Was able to reproduce the issue within one of my repositories.

Thanks @fabriziocacicia for the links and hints:

Possible solution
I think actions/checkout#766 could be a possible cause, and this rht/zulip-archive@2957a94 a possible solution

The reason should be (as mentioned in your link) a currently released git sec bump https://github.blog/2022-04-12-git-security-vulnerability-announced/

Need to check how to solve it in a nice way.

@AndreasAugustin
Copy link
Owner

@all-contributors please add @fabriziocacicia for security and bug

@allcontributors
Copy link
Contributor

@AndreasAugustin

I've put up a pull request to add @fabriziocacicia! 🎉

@AndreasAugustin
Copy link
Owner

@fabriziocacicia thanks for the report. The issue is solved. I do not like the solution but it works 👍

please upgrade the actions-template-sync to latest version v0.3.1-draft. Furthermore please also update the checkout to v3 to reduce the risk of failing checkout.

on:
  # daily trigger
  schedule:
  - cron:  "0 0 * * *"
  # manual trigger
  workflow_dispatch:
jobs:
  template_base_sync:
    runs-on: ubuntu-latest

    steps:
      # To use this repository's private action, you must check out the repository
      - name: Checkout
        uses: actions/checkout@v3  # update to v3
      - name: actions-template-sync
        uses: AndreasAugustin/actions-template-sync@v0.3.1-draft  # update to v0.3.1-draft
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          source_repo_path: fabriziocacicia/template_base
          upstream_branch: main 
          pr_labels: template-update # defaults to chore,template-sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants