Skip to content

vielleicht so

vielleicht so #3

Workflow file for this run

name: CD
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- './github/**'
- './devcontainer/**'
- README.md
- CONTRIBUTING.md
- LICENSE
jobs:
image:
name: Build Container Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/nulldev/csz-bot
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
- uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: image
concurrency: production
environment:
name: Production
if: ${{ !github.event.repository.fork }}
steps:
- name: Deploy CSZ Bot
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262
env:
DOCKER_BUILDKIT: 1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
envs: DOCKER_BUILDKIT
script: /home/csc/deploy.sh