0

I'm trying to automate tagging my work whenever I push something to main. I usually work on the dev branch so pushing something to main usually overlaps with a version bump. This is my workflow:

name: Overwrite the v0.1.1 release with my changes on push

on:
 push:
   branches:
     - main

jobs:
 build-and-push-package:
   runs-on: ubuntu-latest

   steps:
     - name: Checkout repository
       uses: actions/checkout@v3

     - name: Release overwritten version
       run: |
         git tag -a v0.1.1 -f -m "CI test"
         git push origin --force v0.1.1
       with:
         gitea_token: ${{ secrets.LOGIN_TOKEN }}

I want to use this LOGIN_TOKEN that I set up with enough permissions to do so, I don't want to write my git email and my git username in the workflow. When I run this workflow, this is the error I get:

Committer identity unknown
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'gibberish')
  • If the security of your username and password is the main concern here then you should use the GitHub Actions' [encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) for such sensitive information instead of hardcoding them as plain text. – Azeem Aug 25 '23 at 05:44

0 Answers0