From 0c301efc152caab9ccb1c0ffc9db55b49e57c221 Mon Sep 17 00:00:00 2001 From: Jakub Mandula Date: Thu, 8 Feb 2024 16:50:46 +0100 Subject: [PATCH] Build all verisons and push in one file --- ...docker_2004_push.yaml => docker_push.yaml} | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename .github/workflows/{docker_2004_push.yaml => docker_push.yaml} (67%) diff --git a/.github/workflows/docker_2004_push.yaml b/.github/workflows/docker_push.yaml similarity index 67% rename from .github/workflows/docker_2004_push.yaml rename to .github/workflows/docker_push.yaml index 9f3976e5d..a9bc943a1 100644 --- a/.github/workflows/docker_2004_push.yaml +++ b/.github/workflows/docker_push.yaml @@ -1,4 +1,4 @@ -name: "Publish Ubuntu 20.04 image" +name: "Publish Ubuntu images" on: release: @@ -13,6 +13,9 @@ jobs: permissions: packages: write contents: read + strategy: + matrix: + version: [16, 18, 20] steps: - name: Check out the repo uses: actions/checkout@v4 @@ -30,18 +33,18 @@ jobs: # 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: 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 with: context: . - file: Dockerfile_ros1_20_04 + file: Dockerfile_ros1_${{ matrix.version }}_04 push: true - tags: mandulaj/kalibr:20.04 + tags: mandulaj/kalibr:${{ matrix.version }}.04