Skip to content

GitHub Bot CI/CD

GitHub Bot CI/CD #28

Workflow file for this run

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 }}