Skip to content

Commit

Permalink
ci: fix scheduled workflow runs of building base images
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Nov 22, 2023
1 parent b6a931f commit 30919a1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build-kube-ovn-base-dpdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}

- uses: docker/setup-buildx-action@v3
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch

- name: Build
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
make base-amd64-dpdk
make base-tar-amd64-dpdk
- name: Upload image to artifact
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/upload-artifact@v3
with:
name: image-amd64-dpdk-${{ matrix.branch }}
Expand All @@ -61,23 +61,23 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}

- name: Download image
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/download-artifact@v3
with:
name: image-amd64-dpdk-${{ matrix.branch }}

- name: Load Image
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
docker load --input image-amd64-dpdk.tar
- name: Push
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/build-kube-ovn-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}

- uses: docker/setup-buildx-action@v3
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch

- name: Build
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
make base-amd64
make base-tar-amd64
- name: Upload image to artifact
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/upload-artifact@v3
with:
name: image-amd64-${{ matrix.branch }}
Expand All @@ -65,26 +65,26 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}

- uses: docker/setup-buildx-action@v3
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch

- uses: docker/setup-qemu-action@v3
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
platforms: arm64

- name: Build
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
make base-arm64 || make base-arm64
make base-tar-arm64
- name: Upload image to artifact
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/upload-artifact@v3
with:
name: image-arm64-${{ matrix.branch }}
Expand All @@ -108,30 +108,30 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
with:
ref: ${{ matrix.branch }}

- name: Download image
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/download-artifact@v3
with:
name: image-amd64-${{ matrix.branch }}

- name: Download image
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
uses: actions/download-artifact@v3
with:
name: image-arm64-${{ matrix.branch }}

- name: Load Image
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
run: |
docker load --input image-amd64.tar
docker load --input image-arm64.tar
- name: Push
if: github.event.inputs.branch == matrix.branch
if: (github.event.inputs.branch || matrix.branch) == matrix.branch
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down

0 comments on commit 30919a1

Please sign in to comment.