Skip to content

Commit

Permalink
Workflow update
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Jan 5, 2024
1 parent 660c902 commit bf7e295
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-docker-image-gazebo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ on:
# - 'ros1'
pull_request:
types: [closed]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- ros-distro: melodic
- ros-distro: noetic

steps:
Expand All @@ -23,19 +22,19 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Login to Docker Registry
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push (production)
if: github.ref_name == 'ros1'
uses: docker/build-push-action@v2
Expand All @@ -62,4 +61,4 @@ jobs:
ROS_DISTRO=${{ matrix.ros-distro }}
tags: husarion/rosbot:${{ matrix.ros-distro }}-simulation-${{ github.head_ref || github.ref_name }}
cache-from: type=registry,ref=husarion/rosbot:${{ matrix.ros-distro }}-simulation-${{ github.head_ref || github.ref_name }}
cache-to: type=inline
cache-to: type=inline
22 changes: 6 additions & 16 deletions .github/workflows/build-docker-image-hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,15 @@ on:
workflow_dispatch:
pull_request:
types: [closed]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- ros-distro: melodic
ros-noetic-msgs: 0
rosbot-fw-release: 0.16.1
platforms: "linux/amd64, linux/arm64, linux/arm/v7"
- ros-distro: noetic
ros-noetic-msgs: 1
rosbot-fw-release: 0.16.1
platforms: "linux/amd64, linux/arm64"

steps:
Expand All @@ -30,19 +24,19 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: latest

- name: Login to Docker Registry
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push (production)
if: github.ref_name == 'ros1'
uses: docker/build-push-action@v2
Expand All @@ -53,9 +47,7 @@ jobs:
push: true
build-args: |
ROS_DISTRO=${{ matrix.ros-distro }}
ROS_NOETIC_MSGS=${{ matrix.ros-noetic-msgs }}
ROSBOT_FW_RELEASE=${{ matrix.rosbot-fw-release }}
tags: husarion/rosbot:${{ matrix.ros-distro }}
tags: husarion/rosbot:${{ matrix.ros-distro }}
cache-from: type=registry,ref=husarion/rosbot:${{ matrix.ros-distro }}
cache-to: type=inline

Expand All @@ -69,8 +61,6 @@ jobs:
push: true
build-args: |
ROS_DISTRO=${{ matrix.ros-distro }}
ROS_NOETIC_MSGS=${{ matrix.ros-noetic-msgs }}
ROSBOT_FW_RELEASE=${{ matrix.rosbot-fw-release }}
tags: husarion/rosbot:${{ matrix.ros-distro }}-${{ github.head_ref || github.ref_name }}
cache-from: type=registry,ref=husarion/rosbot:${{ matrix.ros-distro }}-${{ github.head_ref || github.ref_name }}
cache-to: type=inline
cache-to: type=inline
2 changes: 0 additions & 2 deletions Dockerfile.hardware
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ ARG ROS_DISTRO=melodic


## =========================== STM32 firmware===============================
# FROM --platform=linux/amd64 ubuntu:18.04 as stm32_firmware_builder
# TODO: wget from releases instead
FROM --platform=linux/amd64 ubuntu:20.04 AS stm32_firmware_builder

ARG ROSBOT_FW_RELEASE=0.16.1
Expand Down

0 comments on commit bf7e295

Please sign in to comment.