Skip to content

Codebase Refactor

Codebase Refactor #53

Workflow file for this run

name: Docker CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
merge_group:
branches: [ "master" ]
workflow_dispatch:
inputs:
copter:
description: 'Copter Version (#.#.#)'
required: false
default: ''
type: string
plane:
description: 'Plane Version (#.#.#)'
required: false
default: ''
type: string
env:
COPTER_VERSION: '4.5.1'
PLANE_VERSION: '4.5.0'
jobs:
Copter-x86:
if: ${{ inputs.copter != '' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy Shared Libraries
run: bash ${GITHUB_WORKSPACE}/configure.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: x86/
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:copter-${{ inputs.copter || env.COPTER_VERSION }}
build-args: VERSION=${{ inputs.copter || env.COPTER_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
Copter-arm:
if: ${{ inputs.copter != '' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy Shared Libraries
run: bash ${GITHUB_WORKSPACE}/configure.sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: arm/
platforms: linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:copter-arm-${{ inputs.copter || env.COPTER_VERSION }}
build-args: VERSION=${{ inputs.copter || env.COPTER_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
Plane-x86:
if: ${{ inputs.plane != '' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy Shared Libraries
run: bash ${GITHUB_WORKSPACE}/configure.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: x86/
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:plane-${{ inputs.plane || env.PLANE_VERSION }}
build-args: |
VEHICLE_TYPE=1
VERSION=${{ inputs.plane || env.PLANE_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
Plane-arm:
if: ${{ inputs.plane != '' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy Shared Libraries
run: bash ${GITHUB_WORKSPACE}/configure.sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: arm/
platforms: linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:plane-arm-${{ inputs.plane || env.PLANE_VERSION }}
build-args: |
VEHICLE_TYPE=1
VERSION=${{ inputs.plane || env.PLANE_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max