-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from husarion/add-panther
Add panther
- Loading branch information
Showing
15 changed files
with
291 additions
and
770 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,65 @@ | ||
name: Build/Publish Docker Image | ||
name: Build a Docker Image | ||
|
||
on: | ||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
build_type: | ||
description: "Is it a \"development\" or a \"stable\" release?" | ||
required: true | ||
default: 'development' | ||
type: choice | ||
options: | ||
- development | ||
- stable | ||
target_distro: | ||
description: "In case of \"stable\" release specify the ROS distro of the existing docker image (eg. humble)" | ||
type: string | ||
default: "ardent" | ||
target_release: | ||
description: "In case of \"stable\" release specify the version of the existing docker image (eg. 1.0.12)" | ||
type: string | ||
default: "0.0.0" | ||
target_date: | ||
description: "In case of \"stable\" release specify the date of the existing docker image in format YYYYMMDD (eg. 20220124)" | ||
type: string | ||
default: "20131206" | ||
repository_dispatch: | ||
types: [rebuild] | ||
pull_request: | ||
types: | ||
- closed | ||
- opened | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
||
include: | ||
- dockerfile: Dockerfile | ||
platforms: "linux/amd64, linux/arm64" | ||
ros_distro: "humble" | ||
repo_name: foxglove | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set FOXGLOVE_VERSION env | ||
run: echo "FOXGLOVE_VERSION=v1.72.0" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Set SHORT_DATE env | ||
run: echo "SHORT_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: docker.io | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push (production) | ||
if: github.ref_name == 'main' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
push: true | ||
build-args: | | ||
FOXGLOVE_VERSION=${{ env.FOXGLOVE_VERSION }} | ||
tags: | | ||
husarion/foxglove:${{ env.FOXGLOVE_VERSION }}-${{ env.SHORT_DATE }} | ||
husarion/foxglove:${{ env.FOXGLOVE_VERSION }} | ||
husarion/foxglove:nightly | ||
# cache-from: type=registry,ref=husarnet/dds-router | ||
cache-to: type=inline | ||
|
||
- name: Build Docker Image | ||
uses: husarion-ci/[email protected] | ||
with: | ||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
repo_name: ${{ matrix.repo_name }} | ||
build_type: ${{ inputs.build_type }} | ||
ros_distro: ${{ matrix.ros_distro }} | ||
platforms: ${{ matrix.platforms }} | ||
# variables important only for stable release | ||
target_distro: ${{ inputs.target_distro }} | ||
target_release: ${{ inputs.target_release }} | ||
target_date: ${{ inputs.target_date }} | ||
- name: Build and push (feature branch) | ||
if: github.ref_name != 'main' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64, linux/arm64 | ||
push: true | ||
build-args: | | ||
FOXGLOVE_VERSION=${{ env.FOXGLOVE_VERSION }} | ||
tags: | | ||
husarion/foxglove:${{ github.head_ref || github.ref_name }}-${{ env.FOXGLOVE_VERSION }} | ||
husarion/foxglove:nightly | ||
# cache-from: type=registry,ref=husarnet/dds-router-${{ github.head_ref || github.ref_name }} | ||
cache-to: type=inline |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,20 @@ | ||
# Listen on localhost on the specified port | ||
:{$FOXGLOVE_PORT} { | ||
root * /src | ||
:{$UI_PORT} { | ||
tls internal | ||
|
||
root * /src | ||
|
||
redir /ui /?ds={$DS_TYPE}&ds.url=ws%3A%2F%2F{http.request.host}%3A{$DS_PORT} | ||
|
||
templates { | ||
mime "application/json" "text/plain" | ||
mime "application/json" "text/plain" "text/html" | ||
} | ||
|
||
file_server browse | ||
file_server browse | ||
|
||
@urdf path /*.urdf | ||
|
||
header @urdf { | ||
Content-Type "text/plain" | ||
} | ||
|
||
# respond /get-default-ws "{{.Host}}{{env 'FOXGLOVE_PORT'}}" 200 { | ||
# close | ||
# } | ||
|
||
header { | ||
# get rid of CORS error | ||
Access-Control-Allow-Origin * | ||
Access-Control-Allow-Credentials true | ||
Access-Control-Allow-Methods * | ||
Access-Control-Allow-Headers * | ||
defer | ||
# Disable caching | ||
Cache-Control "no-cache, no-store, must-revalidate" | ||
} | ||
header @urdf { | ||
Content-Type "text/plain" | ||
} | ||
} |
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
Oops, something went wrong.