Set vars from inside job
This commit is contained in:
parent
4e8595a509
commit
480982a23b
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: set env variable
|
- name: set env variable
|
||||||
run: echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
run: echo "$(git rev-parse --short HEAD)" >> ${{ vars.GIT_SHA_SHORT }}
|
||||||
process:
|
process:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -42,7 +42,7 @@ jobs:
|
|||||||
- name: upload artifact
|
- name: upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: version-${{ env.GIT_SHA_SHORT }}.zip
|
name: version-${{ vars.GIT_SHA_SHORT }}.zip
|
||||||
path: version
|
path: version
|
||||||
download-artifact:
|
download-artifact:
|
||||||
needs: [create-artifact]
|
needs: [create-artifact]
|
||||||
@ -51,11 +51,11 @@ jobs:
|
|||||||
- name: download artifact
|
- name: download artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: version-${{ env.GIT_SHA_SHORT }}.zip
|
name: version-${{ vars.GIT_SHA_SHORT }}.zip
|
||||||
- name: list files
|
- name: list files
|
||||||
run: |
|
run: |
|
||||||
ls ${{ github.workspace }}
|
ls ${{ github.workspace }}
|
||||||
echo $GIT_SHA_SHORT
|
echo ${{ vars.GIT_SHA_SHORT }}
|
||||||
show-report-urlo:
|
show-report-urlo:
|
||||||
needs: [download-artifact]
|
needs: [download-artifact]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user