Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added github action #3

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Docker Image CI

on:
push:
branches: [ humble ]
tags:
- '*'
pull_request:
branches: [ humble ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: What
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Docker Login LCAS
# You may pin to the exact commit or the version.
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
# Server address of Docker registry. If not set then will default to Docker Hub
registry: lcas.lincoln.ac.uk
# Username used to log against the Docker registry
username: ${{ secrets.LCAS_REGISTRY_PUSHER }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.LCAS_REGISTRY_TOKEN }}
- name: Docker Login dockerhub
uses: docker/login-action@v2
with:
# Username used to log against the Docker registry
username: ${{ secrets.DOCKERHUB_USER }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and push limo_ros2 for arm64
uses: docker/build-push-action@v5
with:
context: .devcontainer
file: .devcontainer/Dockerfile
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: lcas.lincoln.ac.uk/lcas/limo_ros_arm64:${{ env.BRANCH }}
build-args: |
BRANCH=${{ env.BRANCH }}
- name: Build and push limo_ros2 for amd64
uses: docker/build-push-action@v5
with:
context: .devcontainer
file: .devcontainer/Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: lcas.lincoln.ac.uk/lcas/limo_ros_amd64:${{ env.BRANCH }}
build-args: |
BRANCH=${{ env.BRANCH }}

Loading