Skip to content

Merge pull request #1 from kkacsh321/fixes_and_docs #2

Merge pull request #1 from kkacsh321/fixes_and_docs

Merge pull request #1 from kkacsh321/fixes_and_docs #2

Workflow file for this run

name: Build and Publish Docker
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
docker:
name: Docker Build and Push
runs-on: [robotf-estimator-runner]
permissions:
id-token: write
actions: write
checks: read
contents: read
pull-requests: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Registry
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
# Setup Docker builds and caching
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
endpoint: builders
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
- name: Install Task
id: install-task
uses: arduino/[email protected]
with:
version: 3.35.1
- name: Get version
id: get_version
run: echo "VERSION=$(task version)" >> "$GITHUB_ENV"
# Build multi-stage Docker image
- name: Build Docker Robotf image
run: |
task docker-load
# Publish image to Registry
- name: Push Image to DockerHub
run: |
task docker-push