Skip to content

Commit

Permalink
workflow: Fix problems with build-asset workflows
Browse files Browse the repository at this point in the history
- It appears like the `if` isn't required when setting env as a
conditional
- `inputs.stage` over input.stage
- Swap matrix.component to matrix.asset

Signed-off-by: stevenhorsman <[email protected]>
  • Loading branch information
stevenhorsman committed May 16, 2024
1 parent d8468cb commit f7fd2f9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-kata-static-tarball-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 96,10 @@ jobs:
ARTEFACT_REGISTRY_USERNAME: ${{ github.actor }}
ARTEFACT_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
RELEASE: ${{ if inputs.stage == 'release' && 'yes' || 'no' }}
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}

- name: store-artifact ${{ matrix.asset }}
if: ${{ matrix.stage != 'release' || (matrix.component != 'agent' && matrix.component != 'coco-guest-components' && matrix.component != 'pause-image') }}
if: ${{ matrix.stage != 'release' || (matrix.asset != 'agent' && matrix.asset != 'coco-guest-components' && matrix.asset != 'pause-image') }}
uses: actions/upload-artifact@v4
with:
name: kata-artifacts-amd64-${{ matrix.asset }}${{ inputs.tarball-suffix }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-kata-static-tarball-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 77,10 @@ jobs:
ARTEFACT_REGISTRY_USERNAME: ${{ github.actor }}
ARTEFACT_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
RELEASE: ${{ if inputs.stage == 'release' && 'yes' || 'no' }}
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}

- name: store-artifact ${{ matrix.asset }}
if: ${{ inputs.stage != 'release' || matrix.component != 'agent' }}
if: ${{ inputs.stage != 'release' || matrix.asset != 'agent' }}
uses: actions/upload-artifact@v4
with:
name: kata-artifacts-arm64-${{ matrix.asset }}${{ inputs.tarball-suffix }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-kata-static-tarball-ppc64le.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 80,10 @@ jobs:
ARTEFACT_REGISTRY_USERNAME: ${{ github.actor }}
ARTEFACT_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
RELEASE: ${{ if inputs.stage == 'release' && 'yes' || 'no' }}
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}

- name: store-artifact ${{ matrix.asset }}
if: ${{ input.stage != 'release' || matrix.component != 'agent' }}
if: ${{ inputs.stage != 'release' || matrix.asset != 'agent' }}
uses: actions/upload-artifact@v4
with:
name: kata-artifacts-ppc64le-${{ matrix.asset }}${{ inputs.tarball-suffix }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-kata-static-tarball-s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 77,10 @@ jobs:
ARTEFACT_REGISTRY_USERNAME: ${{ github.actor }}
ARTEFACT_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
RELEASE: ${{ if inputs.stage == 'release' && 'yes' || 'no' }}
RELEASE: ${{ inputs.stage == 'release' && 'yes' || 'no' }}

- name: store-artifact ${{ matrix.asset }}
if: ${{ inputs.stage != 'release' || (matrix.component != 'agent' && matrix.component != 'coco-guest-components' && matrix.component != 'pause-image') }}
if: ${{ inputs.stage != 'release' || (matrix.asset != 'agent' && matrix.asset != 'coco-guest-components' && matrix.asset != 'pause-image') }}
uses: actions/upload-artifact@v4
with:
name: kata-artifacts-s390x-${{ matrix.asset }}${{ inputs.tarball-suffix }}
Expand Down

0 comments on commit f7fd2f9

Please sign in to comment.