Skip to content

Test action deploy #460

Test action deploy

Test action deploy #460

Workflow file for this run

name: Dockerfiles
# Test and push dockerfiles when they change.
# Test for pull request, push dockerfiles when merged into main.
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: 0 0 1 * *
push:
branches:
- main
paths:
- '**.Dockerfile'
- .github/workflows/docker.yml
pull_request:
workflow_dispatch:
# Cancel in-progress funs of the same workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
- name: Verify dockerfiles
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
./generate.py
git diff --exit-code
docker:
needs: generate
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
docker_image:
- noetic
- melodic
- humble
- humble-cuda
- foxy
- foxy-cuda
- gazebo11
- fortress
- citadel
- garden
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
- name: Build Setup
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build
run: |
./build.py ${{ matrix.docker_image }}
- name: Push
if: github.ref == 'refs/heads/main'
env:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
./build.py --push ${{ matrix.docker_image }}