From 65f06fd282e49d116f8529cbd8f590bc90f8c4c6 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Fri, 15 Mar 2024 16:32:57 +0100 Subject: [PATCH] fix: Release workflow failure on scheduled runs (#836) * fix: Set `live-run` to false on schedule event * chore: Remove redundant publish-docker workflow --- .github/workflows/publish-docker.yml | 88 ---------------------------- .github/workflows/release.yml | 17 +++--- 2 files changed, 9 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/publish-docker.yml diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml deleted file mode 100644 index 30b465b04c..0000000000 --- a/.github/workflows/publish-docker.yml +++ /dev/null @@ -1,88 +0,0 @@ -# -# Copyright (c) 2023 ZettaScale Technology -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License 2.0 which is available at -# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 -# which is available at https://www.apache.org/licenses/LICENSE-2.0. -# -# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 -# -# Contributors: -# ZettaScale Zenoh Team, -# -name: Publish (Docker) - -on: - workflow_dispatch: - inputs: - live-run: - type: boolean - required: true - version: - type: string - required: false - workflow_call: - inputs: - live-run: - type: boolean - required: true - version: - type: string - required: true - -jobs: - main: - name: Docker build and push - runs-on: ubuntu-latest - steps: - - name: Checkout this repository - uses: actions/checkout@v4 - with: - ref: ${{ inputs.version }} - - - name: Download packages from previous job - uses: actions/download-artifact@v3 - with: - path: build - - - name: Unzip artifacts - run: | - ls build - - mkdir -p docker/linux/amd - unzip build/zenoh-${{ inputs.version }}-x86_64-unknown-linux-musl-artifacts.zip -d docker/linux/amd64/ - rm docker/linux/amd64/libzenoh_plugin_example.so - - mkdir -p docker/linux/arm64 - unzip build/zenoh-${{ inputs.version }}-aarch64-unknown-linux-musl-artifacts.zip -d docker/linux/arm64/ - rm docker/linux/arm64/libzenoh_plugin_example.so - - tree docker - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Docker meta - set tags and labels - id: meta - uses: docker/metadata-action@v5 - with: - images: eclipse/zenoh - labels: | - org.opencontainers.image.licenses=EPL-2.0 OR Apache-2.0 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_COM_USERNAME }} - password: ${{ secrets.DOCKER_COM_PASSWORD }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - push: ${{ inputs.live-run }} - platforms: linux/amd64, linux/arm64 - file: .github/workflows/Dockerfile - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e31f324eb9..fe050776ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ on: type: boolean description: If false (or undefined) the workflow runs in dry-run mode (i.e. with no side-effects) required: false + default: false version: type: string description: Release number. If undefined, the workflow auto-generates a version using git-describe @@ -33,7 +34,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/tag-crates.yml@main with: repo: ${{ github.repository }} - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ inputs.version }} inter-deps-pattern: zenoh.* secrets: inherit @@ -68,7 +69,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/release-crates-cargo.yml@main with: repos: ${{ github.repository }} - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} branch: ${{ needs.tag.outputs.branch }} inter-deps-pattern: zenoh.* secrets: inherit @@ -79,7 +80,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/release-crates-debian.yml@main with: no-build: true - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ needs.tag.outputs.version }} repo: ${{ github.repository }} branch: ${{ needs.tag.outputs.branch }} @@ -92,7 +93,7 @@ jobs: with: no-build: true repo: ${{ github.repository }} - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ needs.tag.outputs.version }} branch: ${{ needs.tag.outputs.branch }} artifact-patterns: | @@ -112,7 +113,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/release-crates-eclipse.yml@main with: no-build: true - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ needs.tag.outputs.version }} repo: ${{ github.repository }} branch: ${{ needs.tag.outputs.branch }} @@ -129,7 +130,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/release-crates-github.yml@main with: no-build: true - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ needs.tag.outputs.version }} repo: ${{ github.repository }} branch: ${{ needs.tag.outputs.branch }} @@ -145,7 +146,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/release-crates-dockerhub.yml@main with: no-build: true - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ needs.tag.outputs.version }} repo: ${{ github.repository }} tags: "eclipse/zenoh:${{ needs.tag.outputs.version }}" @@ -165,7 +166,7 @@ jobs: uses: eclipse-zenoh/ci/.github/workflows/release-crates-ghcr.yml@main with: no-build: true - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ needs.tag.outputs.version }} repo: ${{ github.repository }} tags: "${{ github.repository }}:${{ needs.tag.outputs.version }}"