Limit build workflow to manual dispatch only
This commit is contained in:
@@ -1,18 +1,6 @@
|
|||||||
name: Build Cross-Compiled ROS 2 Images
|
name: Build Cross-Compiled ROS 2 Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
- ".github/ISSUE_TEMPLATE/**"
|
|
||||||
- ".github/pull_request_template.md"
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
- ".github/ISSUE_TEMPLATE/**"
|
|
||||||
- ".github/pull_request_template.md"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
platform:
|
platform:
|
||||||
@@ -42,8 +30,8 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: ${{ github.event_name == 'workflow_dispatch' && fromJSON(format('["{0}"]', inputs.platform)) || fromJSON('["rk3588"]') }}
|
platform: ${{ fromJSON(format('["{0}"]', inputs.platform)) }}
|
||||||
ros_distro: ${{ github.event_name == 'workflow_dispatch' && fromJSON(format('["{0}"]', inputs.ros_distro)) || fromJSON('["rolling"]') }}
|
ros_distro: ${{ fromJSON(format('["{0}"]', inputs.ros_distro)) }}
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -57,7 +45,7 @@ jobs:
|
|||||||
network=host
|
network=host
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_images)
|
if: inputs.push_images
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
@@ -70,7 +58,7 @@ jobs:
|
|||||||
docker compose -f cross_compile/compose.yaml build cc-base
|
docker compose -f cross_compile/compose.yaml build cc-base
|
||||||
|
|
||||||
- name: Push cc-base
|
- name: Push cc-base
|
||||||
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_images)
|
if: inputs.push_images
|
||||||
run: |
|
run: |
|
||||||
docker tag cc-base:latest \
|
docker tag cc-base:latest \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/cc-base:latest
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/cc-base:latest
|
||||||
@@ -84,7 +72,7 @@ jobs:
|
|||||||
BUILDKIT_INLINE_CACHE: "1"
|
BUILDKIT_INLINE_CACHE: "1"
|
||||||
|
|
||||||
- name: Push cc-toolchain
|
- name: Push cc-toolchain
|
||||||
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_images)
|
if: inputs.push_images
|
||||||
run: |
|
run: |
|
||||||
docker tag ${{ matrix.platform }}/cc-toolchain:latest \
|
docker tag ${{ matrix.platform }}/cc-toolchain:latest \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.platform }}/cc-toolchain:latest
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.platform }}/cc-toolchain:latest
|
||||||
@@ -98,7 +86,7 @@ jobs:
|
|||||||
BUILDKIT_INLINE_CACHE: "1"
|
BUILDKIT_INLINE_CACHE: "1"
|
||||||
|
|
||||||
- name: Push vendor-packages
|
- name: Push vendor-packages
|
||||||
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_images)
|
if: inputs.push_images
|
||||||
run: |
|
run: |
|
||||||
docker tag ${{ matrix.platform }}/cc-vendor-packages:latest \
|
docker tag ${{ matrix.platform }}/cc-vendor-packages:latest \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.platform }}/cc-vendor-packages:latest
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.platform }}/cc-vendor-packages:latest
|
||||||
@@ -112,7 +100,7 @@ jobs:
|
|||||||
BUILDKIT_INLINE_CACHE: "1"
|
BUILDKIT_INLINE_CACHE: "1"
|
||||||
|
|
||||||
- name: Push ROS 2 image
|
- name: Push ROS 2 image
|
||||||
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push_images)
|
if: inputs.push_images
|
||||||
run: |
|
run: |
|
||||||
docker tag ${{ matrix.platform }}/cc-ros-${{ matrix.ros_distro }}:latest \
|
docker tag ${{ matrix.platform }}/cc-ros-${{ matrix.ros_distro }}:latest \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.platform }}/cc-ros-${{ matrix.ros_distro }}:latest
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.platform }}/cc-ros-${{ matrix.ros_distro }}:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user