Skip to content

Merge pull request #78 from a-andre/no_fixed_id #27

Merge pull request #78 from a-andre/no_fixed_id

Merge pull request #78 from a-andre/no_fixed_id #27

Workflow file for this run

name: Docker
on:
push:
branches: [main]
env:
REGISTRY: ghcr.io
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}/rasta_grpc_bridge
DO_PUSH: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
variant:
- tcp
- udp
- tls
- dtls
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY_IMAGE }}_${{ matrix.variant }}
tags: |
type=ref,event=branch
type=sha
- name: Build and push Docker image
id: build
uses: docker/build-push-action@v4
with:
file: docker/rasta_grpc_bridge/Dockerfile
push: ${{ env.DO_PUSH }}
tags: ${{ steps.meta.outputs.tags }}
target: ${{ matrix.variant }}
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}_${{ matrix.variant }}:main
cache-to: type=inline