Update pre-commit configuration (#28) #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | ||
on: | ||
push: | ||
branches: | ||
- iron | ||
pull_request: | ||
paths: | ||
- .docker/** | ||
- .github/workflows/docker.yaml | ||
workflow_dispatch: | ||
env: | ||
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'robotic-decision-making-lab/ros2-template') }} | ||
jobs: | ||
ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
<<<<<<< HEAD | ||
ROS_DISTRO: [iron] | ||
======= | ||
ROS_DISTRO: [rolling] | ||
>>>>>>> d48bcbd (Update pre-commit configuration (#28)) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log into registry | ||
if: env.PUSH == 'true' | ||
uses: docker/login-action@v3.2.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
if: env.PUSH == 'true' | ||
id: meta | ||
uses: docker/metadata-action@v5.5.1 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=${{ matrix.ROS_DISTRO }}-${{ github.job }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5.4.0 | ||
with: | ||
context: . | ||
file: .docker/Dockerfile | ||
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
target: ${{ github.job }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: ${{ env.PUSH }} | ||
robot: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
<<<<<<< HEAD | ||
ROS_DISTRO: [iron] | ||
======= | ||
ROS_DISTRO: [rolling] | ||
>>>>>>> d48bcbd (Update pre-commit configuration (#28)) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log into registry | ||
if: env.PUSH == 'true' | ||
uses: docker/login-action@v3.2.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
if: env.PUSH == 'true' | ||
id: meta | ||
uses: docker/metadata-action@v5.5.1 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=${{ matrix.ROS_DISTRO }}-${{ github.job }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5.4.0 | ||
with: | ||
context: . | ||
file: .docker/Dockerfile | ||
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
target: ${{ github.job }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: ${{ env.PUSH }} | ||
platforms: linux/amd64,linux/arm64 | ||
desktop: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
<<<<<<< HEAD | ||
ROS_DISTRO: [iron] | ||
======= | ||
ROS_DISTRO: [rolling] | ||
>>>>>>> d48bcbd (Update pre-commit configuration (#28)) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log into registry | ||
if: env.PUSH == 'true' | ||
uses: docker/login-action@v3.2.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
if: env.PUSH == 'true' | ||
id: meta | ||
uses: docker/metadata-action@v5.5.1 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=${{ matrix.ROS_DISTRO }}-${{ github.job }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5.4.0 | ||
with: | ||
context: . | ||
file: .docker/Dockerfile | ||
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
target: ${{ github.job }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: ${{ env.PUSH }} | ||
desktop-nvidia: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
<<<<<<< HEAD | ||
ROS_DISTRO: [iron] | ||
======= | ||
ROS_DISTRO: [rolling] | ||
>>>>>>> d48bcbd (Update pre-commit configuration (#28)) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log into registry | ||
if: env.PUSH == 'true' | ||
uses: docker/login-action@v3.2.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract Docker metadata | ||
if: env.PUSH == 'true' | ||
id: meta | ||
uses: docker/metadata-action@v5.5.1 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=${{ matrix.ROS_DISTRO }}-${{ github.job }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5.4.0 | ||
with: | ||
context: . | ||
file: .docker/Dockerfile | ||
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
target: ${{ github.job }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: ${{ env.PUSH }} |