Comments (5)
Hi, thanks for reaching out! Could you send me a link to your workflow run so that I can look at the logs?
from add-and-commit.
It's a private repo, I'll attach the raw log here:
rawlog.txt
from add-and-commit.
It seems that these logs don't match the workflow you posted, are you sure they're the right ones? I see different step names and that it's downloading the action from your fork
from add-and-commit.
Ciao Frederico,
me dispiace, my team has cleaned out the log, that was the last one I could grab. I forked it, since I though I could change a little but that didn't work out. I isolated the issue and it seems a fundamental behaviour of git when you have subdirectories containing their own .git
files.
Something the API might not allow us to address. Long story short: even if your working directory contains its own .git
directory, the github actions API seems to treat any call against it as call towards the repository where the action was triggered from. So your code isn't the issue here.
I poked around and the only option that seems to work is to rely on a shell script and native git calls. As an added complication the target directory needs to be added as git module. Since the main repo is never pushed back, that's fine.
This is the script I finally used:
#!/bin/bash
# Send UI back to a new branch in backend
now=$(date +"%Y-%m-%d_%H-%M")
message="[UI Commit] ${now}"
# Step1 clone backend
git submodule add https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/$REPO2 backend
# Step3 update UI
rm -rf backend/static/ui
mkdir -p backend/static/ui
cp build/* backend/static/ui/
cd backend
git config user.email "[email protected]"
git config user.name "Acme automation"
git add --all
git commit -m "$message"
git checkout -b ui/ui-$now
git push -u origin ui/ui-$now
Nice lesson learned: I originally used $GITHUB_REPO
as environment variable instead of $REPO2
, but that one is hard wired to the current repo - took me an hour (or longer) to figure that.
Anyway - we can close that issue. And mille grazie for your willingness to help out. Very much appreciated
from add-and-commit.
Happy to hear that you managed to find a solution! This kind of issues can be hard to resolve since you're dealing with something that happens in a machine to which you don't have access, and I must confess that there's still some stuff I'm not really sure about GitHub Action runners 😅
Feel free to open other issues if you have any problem
Ciao ;)
from add-and-commit.
Related Issues (20)
- support pull: true option HOT 1
- How to get push working when another commit was pushed? HOT 3
- `commit_sha` returns the full SHA instead of the 7-character SHA
- Support Disabling\Enabling enforce_admins As Part of Push HOT 5
- Avoid pulling if a new branch was just created HOT 1
- Is there a dry-run input? HOT 1
- suggestion: retry push logic HOT 1
- Pre-Commit script HOT 2
- Warning: There are environment variables missing from this runtime, but would be present on GitHub HOT 4
- Warning: The set-output command is deprecated and will be disabled soon HOT 2
- "add" with array input doesn't seem to work HOT 2
- Error with repository ownership HOT 4
- Error: fatal: detected dubious ownership in repository HOT 1
- It doesn't work for me HOT 5
- Status Check war reseted after Commit HOT 6
- Fetch only one branch for performance issues HOT 4
- Node 20 support HOT 3
- False reporting of Working tree clean. Nothing to commit. HOT 3
- Use on a PR HOT 2
- Error: fatal: Cannot prompt because user interactivity has been disabled. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from add-and-commit.