2024-04-23 07:21:05 +00:00
|
|
|
name: Docker CI/CD
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-04-23 07:26:15 +00:00
|
|
|
- "docker"
|
2024-04-23 07:21:05 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
2024-04-23 07:26:15 +00:00
|
|
|
name: Docker Build and Push
|
|
|
|
container:
|
|
|
|
image: node:20-bookworm
|
2024-04-23 07:21:05 +00:00
|
|
|
steps:
|
2024-04-23 07:43:14 +00:00
|
|
|
- name: Install dependencies
|
2024-04-23 07:26:15 +00:00
|
|
|
run: |
|
|
|
|
apt update
|
2024-04-23 07:43:14 +00:00
|
|
|
apt install -y docker.io build-essential libpython3-dev
|
2024-04-23 07:26:15 +00:00
|
|
|
- name: Set up QEMU
|
2024-04-23 07:21:05 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2024-04-23 07:26:15 +00:00
|
|
|
- name: Set up Docker Buildx
|
2024-04-23 07:21:05 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2024-04-23 07:26:15 +00:00
|
|
|
- name: Login to Docker Hub
|
2024-04-23 07:21:05 +00:00
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2024-04-23 07:26:15 +00:00
|
|
|
- name: Build and push
|
2024-04-23 07:21:05 +00:00
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
push: true
|
2024-04-23 07:26:15 +00:00
|
|
|
tags: kumitterer/matrix-gptbot:latest
|