-
Notifications
You must be signed in to change notification settings - Fork 54
43 lines (37 loc) 路 1.31 KB
/
test.yml
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
name: Build Test
on:
pull_request:
types: [opened, synchronize]
branches:
- master
paths:
- "**/Dockerfile"
- "**/ros**.sh"
- ".github/workflows/test.yml"
env:
DOCKER_USERNAME: tiryoh
DOCKER_IMAGENAME: ros-desktop-vnc
jobs:
build-and-deploy:
continue-on-error: true
strategy:
matrix:
ros-distro: [melodic, melodic-arm64, noetic, noetic-testing, noetic-arm64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v3
- name: Build docker image
id: docker
run: |
TIMESTAMP=$(date '+%Y%m%dT%H%M')
cd ${{ matrix.ros-distro }} && docker build -t $DOCKER_USERNAME/$DOCKER_IMAGENAME:${{ matrix.ros-distro }}-$TIMESTAMP .
echo ::set-output name=timestamp::$TIMESTAMP
- name: Dump docker image
run: |
docker save $DOCKER_USERNAME/$DOCKER_IMAGENAME:${{ matrix.ros-distro }}-${{ steps.docker.outputs.timestamp }} | gzip > ${{ matrix.ros-distro }}-${{ steps.docker.outputs.timestamp }}.tar.gz
- uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: docker-${{ matrix.ros-distro }}-${{ steps.docker.outputs.timestamp }}
path: ${{ matrix.ros-distro }}-${{ steps.docker.outputs.timestamp }}.tar.gz