gha: ci: Avoid using env unless it's really needed

de83cd9de7 tried to solve an issue, but it
clearly seems that I'm using env wrongly, as what ended up being passed
as input was "$VAR", instead of the content of the VAR variable.

As we can simply avoid using those here, let's do it and save us a
headache.

Fixes: #7247

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-07-06 23:59:18 +02:00
parent 58e921eace
commit 11e3ccfa4d
3 changed files with 12 additions and 22 deletions

View File

@ -3,9 +3,6 @@ on:
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
env:
COMMIT_HASH: ${GITHUB_REF}
jobs: jobs:
set-fake-pr-number: set-fake-pr-number:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -18,6 +15,6 @@ jobs:
needs: set-fake-pr-number needs: set-fake-pr-number
uses: ./.github/workflows/ci.yaml uses: ./.github/workflows/ci.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
pr-number: $PR_NUMBER pr-number: ${PR_NUMBER}
tag: $PR_NUMBER-$COMMIT_HASH-nightly tag: ${PR_NUMBER}-${GITHUB_REF}-nightly

View File

@ -12,15 +12,11 @@ on:
- synchronize - synchronize
- reopened - reopened
- labeled - labeled
env:
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
jobs: jobs:
kata-containers-ci-on-push: kata-containers-ci-on-push:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
uses: ./.github/workflows/ci.yaml uses: ./.github/workflows/ci.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${{ github.event.pull_request.sha }}
pr-number: $PR_NUMBER pr-number: ${{ github.event.pull_request.number }}
tag: $PR_NUMBER-$COMMIT_HASH tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}

View File

@ -5,28 +5,25 @@ on:
- main - main
- stable-* - stable-*
env:
COMMIT_HASH: $GITHUB_REF
jobs: jobs:
build-assets-amd64: build-assets-amd64:
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
push-to-registry: yes push-to-registry: yes
secrets: inherit secrets: inherit
build-assets-arm64: build-assets-arm64:
uses: ./.github/workflows/build-kata-static-tarball-arm64.yaml uses: ./.github/workflows/build-kata-static-tarball-arm64.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
push-to-registry: yes push-to-registry: yes
secrets: inherit secrets: inherit
build-assets-s390x: build-assets-s390x:
uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
push-to-registry: yes push-to-registry: yes
secrets: inherit secrets: inherit
@ -34,7 +31,7 @@ jobs:
needs: build-assets-amd64 needs: build-assets-amd64
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
registry: quay.io registry: quay.io
repo: kata-containers/kata-deploy-ci repo: kata-containers/kata-deploy-ci
tag: kata-containers-amd64 tag: kata-containers-amd64
@ -44,7 +41,7 @@ jobs:
needs: build-assets-arm64 needs: build-assets-arm64
uses: ./.github/workflows/publish-kata-deploy-payload-arm64.yaml uses: ./.github/workflows/publish-kata-deploy-payload-arm64.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
registry: quay.io registry: quay.io
repo: kata-containers/kata-deploy-ci repo: kata-containers/kata-deploy-ci
tag: kata-containers-arm64 tag: kata-containers-arm64
@ -54,7 +51,7 @@ jobs:
needs: build-assets-s390x needs: build-assets-s390x
uses: ./.github/workflows/publish-kata-deploy-payload-s390x.yaml uses: ./.github/workflows/publish-kata-deploy-payload-s390x.yaml
with: with:
commit-hash: $COMMIT_HASH commit-hash: ${GITHUB_REF}
registry: quay.io registry: quay.io
repo: kata-containers/kata-deploy-ci repo: kata-containers/kata-deploy-ci
tag: kata-containers-s390x tag: kata-containers-s390x