2024-10-21 12:52:40 -04:00
|
|
|
name: Build and Deploy Docker Image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-10-21 13:11:04 -04:00
|
|
|
runs-on: ubuntu-latest
|
2024-10-21 12:52:40 -04:00
|
|
|
steps:
|
2024-10-21 14:18:43 -04:00
|
|
|
|
2024-10-21 12:52:40 -04:00
|
|
|
- name: Checkout code
|
2024-10-21 13:04:09 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-10-21 12:52:40 -04:00
|
|
|
|
2024-10-21 14:19:35 -04:00
|
|
|
- name: see if docker is in path
|
|
|
|
run: |
|
2024-10-21 15:11:21 -04:00
|
|
|
docker info
|
2024-10-21 14:19:35 -04:00
|
|
|
|
2024-10-21 12:52:40 -04:00
|
|
|
- name: Set up Docker Buildx
|
2024-10-21 13:43:28 -04:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2024-10-21 12:52:40 -04:00
|
|
|
|
|
|
|
- name: Log in to Gitea Container Registry
|
2024-10-21 13:49:06 -04:00
|
|
|
uses: docker/login-action@v3
|
2024-10-21 13:20:17 -04:00
|
|
|
with:
|
2024-10-21 13:48:16 -04:00
|
|
|
password: ${{ secrets.PASSWORD }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
2024-10-21 13:47:23 -04:00
|
|
|
registry: http://git.thecodedom.com:3000
|
2024-10-21 12:52:40 -04:00
|
|
|
|
|
|
|
- name: Build and push Docker image
|
2024-10-21 13:44:57 -04:00
|
|
|
uses: docker/build-push-action@v6
|
2024-10-21 12:52:40 -04:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2024-10-21 13:47:23 -04:00
|
|
|
tags: http://git.thecodedom.com:3000/smig/dotechbro-website:latest
|
2024-10-21 12:52:40 -04:00
|
|
|
|