Skip to content

Fix tag name

Fix tag name #7

name: Create Container Image
on:
push:
branches: [main]
paths-ignore:
- 'examples/**'
env:
REGISTRY: ghcr.io
SERVER_IMAGE_NAME: ghcr.io/${{ github.repository }}/server
AGENT_IMAGE_NAME: ghcr.io/${{ github.repository }}/agent
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
context: "{{defaultContext}}:layered-image"
file: ./Containerfile
- name: Build and push Docker server image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.SERVER_IMAGE_NAME }}:latest
context: "{{defaultContext}}:layered-image"
file: ./Containerfile
target: server
- name: Build and push Docker agent image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.AGENT_IMAGE_NAME }}:latest
target: agent