autobaan/.github/workflows/main.yml
2023-07-28 19:46:50 +02:00

27 lines
No EOL
733 B
YAML

name: Push to main
on:
push:
branches:
- main
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: Build docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/server/Dockerfile
push: true
tags: ghcr.io/cgduncan7/autobaan:latest
cache-from: type=gha
cache-to: type=gha,mode=max