Using GITHUB_SHA or GITEA_SHA in Gitea actions

How to use vars GITHUB SHA or GITEA SHA in Gitea actions? or you have another variable to show commit id? i want to create a unique docker image with commit id, and deploy image with this commit id. Thank you for your answer.

I found that GITHUB_SHA is avaiable, but its was in powershell. if you want use it in powershell you must use it like $ENV:GITHUB_SHA.Substring(0,10) it will be commit hash. And you can use it. if it will be your machine windows docker. but other ways works fine in linux docker images and hosts.

On Linux, the following will work:

      - name: Print commit hash
        run: |
          echo ${hash::10}

The colon colon 10 syntax is a parameter expansion that prints the first 10 characters.