diff --git a/.forgejo/workflows/gitify.yaml b/.forgejo/workflows/gitify.yaml index 4e802c0..c20abb8 100644 --- a/.forgejo/workflows/gitify.yaml +++ b/.forgejo/workflows/gitify.yaml @@ -4,6 +4,16 @@ jobs: consolidated_texts_to_git: runs-on: docker steps: + - name: Configure SSH + run: | + # Run ssh-agent. + eval $(ssh-agent -s) + echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' | ssh-add - + mkdir -p ~/.ssh + chmod 700 ~/.ssh + // Accept the SSH host keys of Forgejo server. + echo "${{ vars.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts + chmod 644 ~/.ssh/known_hosts - name: Checkout tricoteuses-legifrance uses: https://code.forgejo.org/actions/checkout@v4 - name: Install tricoteuses-legifrance @@ -29,7 +39,7 @@ jobs: # Forgejo configuration used to store git version of law FORGEJO_SSH_ACCOUNT=${{ secrets.FORGEJO_SSH_ACCOUNT }} FORGEJO_SSH_PORT=${{ secrets.FORGEJO_SSH_PORT }} - # Token consolidated_texts_to_git of Forgejo user that executes "git push": + # Token consolidated_texts_to_git of user that calls Forgejo API: FORGEJO_TOKEN="${{ secrets.FORGEJO_TOKEN }}" FORGEJO_URL="https://git.tricoteuses.fr" diff --git a/example.env b/example.env index 977d6b3..f7360c1 100644 --- a/example.env +++ b/example.env @@ -17,6 +17,7 @@ DB_PASSWORD="legi" # Forgejo configuration used to store git version of law FORGEJO_SSH_ACCOUNT="git@YOUR.FORGEJO.SERVER.DOMAIN" FORGEJO_SSH_PORT=22 +# Token of user that calls Forgejo API: FORGEJO_TOKEN="YOUR SECRET FORGEJO TOKEN" FORGEJO_URL="https://YOUR.FORGEJO.SERVER.DOMAIN"