diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9558366..210e320 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -34,6 +34,12 @@ jobs: id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Get commit information + id: gitinfo + run: | + echo "::set-output name=sha::$(git log -1 --format="%H")" + echo "::set-output name=message::$(git log -1 --format="%s")" + - name: Checkout code uses: https://github.com/actions/checkout@v4 @@ -59,6 +65,6 @@ jobs: cache-to: "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.DOCKER_IMAGE }}:cache" cache-from: "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.DOCKER_IMAGE }}:cache" labels: | - org.opencontainers.image.revision=${{ env.GITHUB_COMMIT_SHA }} - org.opencontainers.image.source=${{ env.GITHUB_REPOSITORY }} + org.opencontainers.image.revision=${{ steps.gitinfo.outputs.sha }} + org.opencontainers.image.commit_message=${{ steps.gitinfo.outputs.message }} org.opencontainers.image.created=${{ steps.date.outputs.date }}