From 2d28c857f9ae9e3b5796b32dc3efd003bfe342e2 Mon Sep 17 00:00:00 2001 From: maximo tejeda Date: Thu, 15 Aug 2024 14:56:00 -0400 Subject: [PATCH] add short --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d127778..71f3710 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,4 @@ name: Ci Actions worker -env: - on: push: branches: [master] @@ -13,6 +11,8 @@ jobs: process: runs-on: ubuntu-latest steps: + - name: set env variable + run: echo "GIT_SHA_SHORT=$(git rev-parse --short)" >> $GITHUB_ENV - name: run one line script run: echo one line script - name: runs a set of command using the runner shell @@ -37,12 +37,12 @@ jobs: - name: create file run: | mkdir version - echo "v0.0.1" > version/version-${{ github.sha }}.txt + echo "v0.0.1" > version/version-$GIT_SHA_SHORT.txt ls ${{ github.workspace}} - name: upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: - name: version-${{ github.sha }}.zip + name: version-$GIT_SHA_SHORT.zip path: version download-artifact: needs: [create-artifact] @@ -51,7 +51,7 @@ jobs: - name: download artifact uses: actions/download-artifact@v3 with: - name: version-${{ github.sha }}.zip + name: version-$GIT_SHA_SHORT.zip - name: list files run: | ls ${{ github.workspace }}