Skip to content

Commit

Permalink
new workflows for CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Nov 7, 2024
1 parent 0281217 commit 2342aba
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 45 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/foxy-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Foxy Docker Builds
name: Foxy Docker Build

on: [push, pull_request]

Expand All @@ -12,15 +12,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=foxy
push: true
tags: mgons/yasmin:foxy
push: false
32 changes: 32 additions & 0 deletions .github/workflows/foxy-docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Foxy Docker Push

on:
workflow_run:
workflows: ["foxy_docker_build"]
types:
- completed

jobs:
foxy_docker_push:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }}

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=foxy
push: true
tags: mgons/yasmin:foxy
11 changes: 2 additions & 9 deletions .github/workflows/galactic-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Galactic Docker Builds
name: Galactic Docker Build

on: [push, pull_request]

Expand All @@ -12,15 +12,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=galactic
push: true
tags: mgons/yasmin:galactic
push: false
32 changes: 32 additions & 0 deletions .github/workflows/galactic-docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Galactic Docker Push

on:
workflow_run:
workflows: ["galactic_docker_build"]
types:
- completed

jobs:
galactic_docker_push:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }}

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=galactic
push: true
tags: mgons/yasmin:galactic
11 changes: 2 additions & 9 deletions .github/workflows/humble-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Humble Docker Builds
name: Humble Docker Build

on: [push, pull_request]

Expand All @@ -12,15 +12,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=humble
push: true
tags: mgons/yasmin:humble
push: false
30 changes: 30 additions & 0 deletions .github/workflows/humble-docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Humble Docker Push

on:
workflow_run:
workflows: ["humble_docker_build"]
types:
- completed

jobs:
humble_docker_push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=humble
push: true
tags: mgons/yasmin:humble
11 changes: 2 additions & 9 deletions .github/workflows/iron-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Iron Docker Builds
name: Iron Docker Build

on: [push, pull_request]

Expand All @@ -12,15 +12,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=iron
push: true
tags: mgons/yasmin:iron
push: false
30 changes: 30 additions & 0 deletions .github/workflows/iron-docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Iron Docker Push

on:
workflow_run:
workflows: ["iron_docker_build"]
types:
- completed

jobs:
iron_docker_push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=iron
push: true
tags: mgons/yasmin:iron
11 changes: 2 additions & 9 deletions .github/workflows/jazzy-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Jazzy Docker Builds
name: Jazzy Docker Build

on: [push, pull_request]

Expand All @@ -12,15 +12,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=jazzy
push: true
tags: mgons/yasmin:jazzy
push: false
30 changes: 30 additions & 0 deletions .github/workflows/jazzy-docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Jazzy Docker Push

on:
workflow_run:
workflows: ["jazzy_docker_build"]
types:
- completed

jobs:
jazzy_docker_push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: ROS_DISTRO=jazzy
push: true
tags: mgons/yasmin:jazzy

0 comments on commit 2342aba

Please sign in to comment.