Skip to content

Commit

Permalink
Replaced version number with environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rrhan0 committed Sep 30, 2023
1 parent b1a6781 commit 745d3ee
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
required: true
type: string

env:
COPTER_VERSION: '4.3.7'
PLANE_VERSION: '4.3.4'

jobs:
Copter-x86:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,8 +49,8 @@ jobs:
context: x86/
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:copter-${{ inputs.copter || '4.3.7' }}
build-args: VERSION=${{ inputs.copter || '4.3.7' }}
tags: ubcuas/uasitl:copter,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

Expand Down Expand Up @@ -80,8 +84,8 @@ jobs:
context: arm/
platforms: linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:copter-arm-${{ inputs.copter || '4.3.7' }}
build-args: VERSION=${{ inputs.copter || '4.3.7' }}
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

Expand Down Expand Up @@ -112,8 +116,8 @@ jobs:
context: x86/
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:plane-${{ inputs.plane || '4.3.4' }}
build-args: VEHICLE_TYPE=1,VERSION=${{ inputs.plane || '4.3.4' }}
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

Expand Down Expand Up @@ -147,7 +151,7 @@ jobs:
context: arm/
platforms: linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ubcuas/uasitl:plane-arm-${{ inputs.plane || '4.3.4' }}
build-args: VEHICLE_TYPE=1,VERSION=${{ inputs.plane || '4.3.4' }}
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

0 comments on commit 745d3ee

Please sign in to comment.