From 4cec60a23ee67b76af7cb4edf16364a614909aa6 Mon Sep 17 00:00:00 2001 From: Jakub Mandula Date: Thu, 8 Feb 2024 17:23:09 +0100 Subject: [PATCH] only push on release --- .github/workflows/docker_push.yaml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker_push.yaml b/.github/workflows/docker_push.yaml index a9bc943a1..65a2a6f5e 100644 --- a/.github/workflows/docker_push.yaml +++ b/.github/workflows/docker_push.yaml @@ -3,8 +3,6 @@ name: "Publish Ubuntu images" on: release: types: [published] - push: - branches: [ master, dockerfile ] jobs: push_to_registries: @@ -21,30 +19,15 @@ jobs: uses: actions/checkout@v4 - name: Log in to Docker Hub - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - # - name: Log in to the Container registry - # uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - - # - name: Extract metadata (tags, labels) for Docker - # id: meta - # uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - # with: - # images: | - # mandulaj/kalibr - # # ghcr.io/${{ github.repository }} - - name: Build and push Docker images - uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + uses: docker/build-push-action@v5 with: context: . file: Dockerfile_ros1_${{ matrix.version }}_04 push: true - tags: mandulaj/kalibr:${{ matrix.version }}.04 + tags: ${{ DOCKER_HUB_REPOSITORY }}/kalibr:${{ matrix.version }}.04