From 24e32cbf3d17ec24595ca770a138aa26c756d653 Mon Sep 17 00:00:00 2001 From: a601287411 <601287411@qq.com> Date: Wed, 29 Mar 2023 17:42:27 +0800 Subject: [PATCH] test github metadata --- .gitea/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 28491ea..3f278d6 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -4,6 +4,8 @@ on: [push] env: REPOSITORY: ${{ github.repository }} COMMIT_ID: ${{ github.sha }} + IMAGE_NAME: $(echo $REPOSITORY | awk -F/ '{print $NF}') + IMAGE_TAG: ${COMMIT_ID:0:10} jobs: Explore-Gitea-Actions: runs-on: ubuntu-latest @@ -11,7 +13,7 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "repository_name is $(echo $REPOSITORY | awk -F/ '{print $NF}'), commit id is $COMMIT_ID, docker tag is ${COMMIT_ID:0:10}" + - run: echo "repository_name is $IMAGE_NAME, docker tag is ${COMMIT_ID:0:10}" - name: Check out repository code uses: actions/checkout@v3 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."