2024-04-23 09:46:33 +00:00
|
|
|
name: Docker CI/CD
|
2024-04-23 07:21:05 +00:00
|
|
|
|
|
|
|
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 09:10:50 +00:00
|
|
|
name: Docker Build and Push to Docker Hub
|
2024-04-23 07:26:15 +00:00
|
|
|
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:52:43 +00:00
|
|
|
apt install -y docker.io
|
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 08:27:15 +00:00
|
|
|
- name: Build and push to Docker Hub
|
2024-04-23 07:21:05 +00:00
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
push: true
|
2024-04-23 08:40:06 +00:00
|
|
|
tags: |
|
|
|
|
kumitterer/matrix-gptbot:latest
|
2024-04-23 08:45:57 +00:00
|
|
|
kumitterer/matrix-gptbot:${{ env.GITHUB_SHA }}
|