Master commit next.

This commit is contained in:
clive
2024-05-06 21:40:01 +10:00
parent 267235e7da
commit 9b1baedfa7
165 changed files with 83177 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
name: Gitea CI/CD
on:
push: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: https://registry.rokoh.com
- name: Build Docker image
run: docker build -t registry.rokoh.com/your-image-name:${{ github.sha }} .
- name: Push Docker image to registry
run: docker push registry.rokoh.com/your-image-name:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Install Docker
uses: docker/setup-action@v2
- name: Pull Docker image from registry
run: docker pull registry.rokoh.com/your-image-name:${{ github.sha }}
- name: Run Docker container
run: docker run -d -p 80:80 registry.rokoh.com/your-image-name:${{ github.sha }}