Skip to content

ci: add deploy workflow #2

ci: add deploy workflow

ci: add deploy workflow #2

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
bot_image:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Setup | Buildx
uses: docker/setup-buildx-action@v2
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Login to GHCR
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build | Extract Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/bunnybots-2023-ml
tags: |
type=sha
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Build | Build and Push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max