mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-27 01:20:31 +03:00
ci: first attempt at general bits and bobs...
Obviously given the state of github yaml-engineering there's no way I'm going to get this right on the first try but hey ho. things *should* work.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: GitHub Bot CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- "github-bot/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Docker Hub login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ./
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/tachi-gh-bot:stable
|
||||
file: ./Dockerfile.ghbot
|
||||
cache-from: type=gha,scope=$GITHUB_REF_NAME-github-bot
|
||||
cache-to: type=gha,mode=max,scope=$GITHUB_REF_NAME-github-bot
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
Reference in New Issue
Block a user