Skip to content

Commit

Permalink
ci: add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
max-niederman committed Nov 3, 2023
1 parent c3915b8 commit 7f61909
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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

0 comments on commit 7f61909

Please sign in to comment.