Docker #739
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: '0 6 * * *' # once a day at 6AM UTC (1AM/EST, 2AM/EDT) | |
workflow_dispatch: | |
# To test workflow updates you need to work in a branch directly on viamrobotics/rdk | |
# and tag your working branch instead of @main in any viamrobotics/rdk "uses" below. | |
# Don't forget to tag back to @main before merge. | |
jobs: | |
docker-cache: | |
name: Build Cache Docker Images | |
strategy: | |
matrix: | |
include: | |
# rdk-devenv | |
- arch: ubuntu-latest | |
tag: amd64 | |
platform: linux/amd64 | |
image: rdk-devenv | |
file: etc/Dockerfile.cache | |
- arch: ubuntu-small-arm | |
tag: arm64 | |
platform: linux/arm64 | |
image: rdk-devenv | |
file: etc/Dockerfile.cache | |
- arch: ubuntu-small-arm | |
tag: armhf | |
platform: linux/arm/v7 | |
image: rdk-devenv | |
file: etc/Dockerfile.cache | |
# antique2 | |
- arch: ubuntu-latest | |
platform: linux/amd64 | |
image: antique2 | |
file: etc/Dockerfile.antique-cache | |
tag: amd64 | |
- arch: ubuntu-small-arm | |
platform: linux/arm64 | |
image: antique2 | |
file: etc/Dockerfile.antique-cache | |
tag: arm64 | |
- arch: ubuntu-small-arm | |
platform: linux/arm/v7 | |
image: antique2 | |
file: etc/Dockerfile.antique-cache | |
tag: armhf | |
runs-on: ${{ matrix.arch }} | |
timeout-minutes: 30 | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/setup-buildx-action@v2 | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: docker/build-push-action@v5 | |
with: | |
push: true | |
pull: true | |
tags: 'ghcr.io/viamrobotics/${{ matrix.image }}:${{ matrix.tag }}-cache' | |
platforms: ${{ matrix.platform }} | |
build-args: | | |
MAIN_TAG=ghcr.io/viamrobotics/${{ matrix.image }} | |
BASE_TAG=${{ matrix.tag }} | |
file: ${{ matrix.file }} | |
test: | |
needs: docker-cache | |
uses: viamrobotics/rdk/.github/workflows/test.yml@main | |
secrets: | |
MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }} | |
DOCKER_PUBLIC_READONLY_PAT: ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }} |