Skip to content

feat: remove ssl from rosbridge so tls can be terminated by reverse p… #19

feat: remove ssl from rosbridge so tls can be terminated by reverse p…

feat: remove ssl from rosbridge so tls can be terminated by reverse p… #19

on:
push:
branches:
- "main"
- "humble"
jobs:
deploy-main-image:
name: Build and deploy main docker image
runs-on: ubuntu-latest
env:
PLATFORM: linux/amd64
MAIN_IMAGE: ghcr.io/${{ github.repository_owner }}/firo_robot
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract branch name
run: echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >>${GITHUB_ENV}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install -D semantic-release @semantic-release/exec conventional-changelog-conventionalcommits
- name: Tag version
id: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release -t "${{env.BRANCH}}-\${version}"
# github.repository_owner can contain uppercase chars,
# but docker repository address must be all lowercase
- name: lowercase image name
if: ${{ steps.semantic-release.outputs.next_version || false }}
run: |
echo "MAIN_IMAGE=${MAIN_IMAGE,,}" >>${GITHUB_ENV}
- name: Set up QEMU
if: ${{ steps.semantic-release.outputs.next_version || false }}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: ${{ steps.semantic-release.outputs.next_version || false }}
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ steps.semantic-release.outputs.next_version || false }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push image
if: ${{ steps.semantic-release.outputs.next_version || false }}
uses: docker/build-push-action@v6
with:
file: Dockerfile
push: true
provenance: false # Remove in the future. Currently ghcr does not parse it correctly
tags: |
${{ env.MAIN_IMAGE }}:${{env.BRANCH}}-${{steps.semantic-release.outputs.next_version}}
${{ env.MAIN_IMAGE }}:${{env.BRANCH}}
platforms: ${{ env.PLATFORM }}
cache-from: ${{ env.MAIN_IMAGE }}:${{env.BRANCH}}
build-args: BUILDKIT_INLINE_CACHE=1