diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27a344f..47e7361 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,12 +14,12 @@ name: CI on: - push: - branches: ["**"] - pull_request: - branches: ["**"] + release: + types: [published] schedule: - - cron: "0 6 * * 1-5" + - cron: "0 1 * * 1-5" + workflow_dispatch: + jobs: check: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3efbb07..104a40e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,12 @@ name: Release on: - release: - types: [published] + push: + branches: ["**"] + pull_request: + branches: ["**"] schedule: - - cron: "0 1 * * 1-5" - workflow_dispatch: + - cron: "0 6 * * 1-5" jobs: checks: @@ -261,55 +262,55 @@ jobs: ${{ steps.package.outputs.BIN_PKG_NAME }} ${{ steps.package.outputs.DEBS_PKG_NAME }} - # docker-build: - # name: Docker build and push - # needs: [checks, builds] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 500 # NOTE: get long history for git-version crate to correctly compute a version - # submodules: recursive - # - name: Fetch Git tags # NOTE: workaround for https://github.com/actions/checkout/issues/290 - # shell: bash - # run: git fetch --tags --force - # - name: Download packages from previous job - # uses: actions/download-artifact@v2 - # with: - # path: PACKAGES - # - name: Unzip PACKAGES - # run: | - # ls PACKAGES - # mkdir -p docker/linux/amd - # unzip PACKAGES/x86_64-unknown-linux-musl/zenoh-bridge-ros1-${{ needs.checks.outputs.PKG_VERSION }}-x86_64-unknown-linux-musl.zip -d docker/linux/amd64/ - # mkdir -p docker/linux/arm64 - # unzip PACKAGES/aarch64-unknown-linux-musl/zenoh-bridge-ros1-${{ needs.checks.outputs.PKG_VERSION }}-aarch64-unknown-linux-musl.zip -d docker/linux/arm64/ - # tree docker - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - # - name: Docker meta - set tags and labels - # id: meta - # uses: docker/metadata-action@v3 - # with: - # images: eclipse/zenoh-bridge-ros1 - # - name: Login to DockerHub - # uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKER_COM_USERNAME }} - # password: ${{ secrets.DOCKER_COM_PASSWORD }} - # - name: Build and push - # uses: docker/build-push-action@v2 - # with: - # context: . - # platforms: linux/amd64,linux/arm64 - # file: .github/workflows/Dockerfile - # push: true - # tags: ${{ steps.meta.outputs.tags }} - # labels: ${{ steps.meta.outputs.labels }} + docker-build: + name: Docker build and push + needs: [checks, builds] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 500 # NOTE: get long history for git-version crate to correctly compute a version + submodules: recursive + - name: Fetch Git tags # NOTE: workaround for https://github.com/actions/checkout/issues/290 + shell: bash + run: git fetch --tags --force + - name: Download packages from previous job + uses: actions/download-artifact@v2 + with: + path: PACKAGES + - name: Unzip PACKAGES + run: | + ls PACKAGES + mkdir -p docker/linux/amd + unzip PACKAGES/x86_64-unknown-linux-musl/zenoh-bridge-ros1-${{ needs.checks.outputs.PKG_VERSION }}-x86_64-unknown-linux-musl.zip -d docker/linux/amd64/ + mkdir -p docker/linux/arm64 + unzip PACKAGES/aarch64-unknown-linux-musl/zenoh-bridge-ros1-${{ needs.checks.outputs.PKG_VERSION }}-aarch64-unknown-linux-musl.zip -d docker/linux/arm64/ + tree docker + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Docker meta - set tags and labels + id: meta + uses: docker/metadata-action@v3 + with: + images: eclipse/zenoh-bridge-ros1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_COM_USERNAME }} + password: ${{ secrets.DOCKER_COM_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64,linux/arm64 + file: .github/workflows/Dockerfile + push: false # true todo: temporary disabled + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} publication: name: Release publication - if: needs.checks.outputs.IS_RELEASE == 'true' + if: false # needs.checks.outputs.IS_RELEASE == 'true' todo: temporary disabled needs: [checks, builds] runs-on: ubuntu-latest steps: