2024-10-09 22:50:46 -04:00
|
|
|
name: Deploy & Publish Image
|
2024-10-09 22:28:00 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
paths-ignore:
|
|
|
|
- README.md
|
|
|
|
- LICENSE
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [ "ubuntu-latest" ]
|
|
|
|
git-version: [ "2.44.0" ]
|
|
|
|
runs-on: ${{ matrix.arch }}
|
|
|
|
|
|
|
|
# Steps to run
|
|
|
|
steps:
|
|
|
|
# Checkout the repo
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2024-10-09 22:50:46 -04:00
|
|
|
# Deploy to Dokku
|
|
|
|
- name: Deploy to Dokku
|
|
|
|
uses: dokku/github-action@master
|
|
|
|
with:
|
|
|
|
git_remote_url: "ssh://dokku@10.10.70.73:22/docs"
|
|
|
|
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
|
|
|
|
2024-10-09 22:28:00 -04:00
|
|
|
# Set up Docker Buildx
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
# Login to the Docker registry
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: git.rainnny.club
|
|
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
|
|
|
|
# Publish the image
|
|
|
|
- name: Build Image
|
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: |
|
2024-10-09 22:31:50 -04:00
|
|
|
git.rainnny.club/pulseapp/docs:${{ github.sha }}
|
|
|
|
git.rainnny.club/pulseapp/docs:latest
|
2024-10-09 22:28:00 -04:00
|
|
|
build-args: |
|
|
|
|
GIT_REV=${{ gitea.sha }}
|