Open alexnault opened 3 years ago
My current workaround is to manually install git-crypt and set the $GITHUB_PATH:
name: Deploy
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# ...
- name: Install git-crypt
run: |
git clone https://github.com/AGWA/git-crypt.git
cd git-crypt && make && make install PREFIX=/opt/project
echo "/opt/project/bin" >> $GITHUB_PATH
- name: Unlock git-crypt
run: |
echo ${{ secrets.GIT_CRYPT_KEY }} | base64 -d > ./git-crypt-key
git-crypt unlock ./git-crypt-key
rm ./git-crypt-key
- name: Login with built-in token to enable commiting
run: |
git config user.name github-actions
git config user.email github-actions@github.com
# ...
Same issue, I believe it is because the git-crypt folder inside .git ends up being owned by root, not the user the worker is running in.
Once the repo is unlocked, any attempt to commit from the GH Action will result in an error: