name: Build and push image

on:
  push:
    branches: [main]

jobs:
  Build:
    runs-on: ubuntu-latest
    steps:
      - name: Install
        run: curl -fsSL get.docker.com | bash
      - name: Clone
        run: git clone https://git.tgj.services/thatguyjack/game-server-docker.git .
      - name: Login
        run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login git.tgj.services -u thatguyjack --password-stdin
      - name: Buildx Container 
        run: docker buildx create --name buildx --driver=docker-container
      - name: Build ACC-web
        run: docker buildx build --builder=buildx --platform=linux/amd64 ./acc-web -t git.tgj.services/thatguyjack/acc-web:latest --push
        #run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64 ./ACC -t git.tgj.services/thatguyjack/acc:latest --push