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 }}