-
Notifications
You must be signed in to change notification settings - Fork 60
47 lines (43 loc) · 1.1 KB
/
Docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Docker
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
pull_request:
paths:
- '**'
- '!docs/**'
- '!README.md'
- '!.github/**'
- '.github/workflows/Docker.yaml'
- '!mkdocs.yml'
push:
branches:
- master
release:
types: [published]
jobs:
job1:
name: Build Docker image
runs-on: ubuntu-20.04
timeout-minutes: 180
strategy:
matrix:
rosdistro: [humble]
steps:
- uses: actions/checkout@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
tags: ghcr.io/${{ github.repository_owner }}/scenario_simulator_v2:${{ matrix.rosdistro }}
no-cache: true
build-args: ROS_DISTRO=${{ matrix.rosdistro }}
push: ${{ github.event_name != 'pull_request' }}