rtj.dev/.gitea/workflows/build.yml

36 lines
1.1 KiB
YAML

name: rtj.dev Build and Deploy
run-name: Build and Deploy
on: [push]
jobs:
Build-and-Deploy:
runs-on: docker
defaults:
run:
shell: sh
steps:
- name: Setup node.js
run: |
apk --update add nodejs npm git curl
- name: Check out repository code recursively
uses: actions/checkout@v3
with:
submodules: recursive
- name: Print repository name
run: |
echo "💡 The "${{ gitea.repository }}" repository has been cloned to the runner."
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: git.rtj.dev
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Build Docker Image
run: |
cd ${{ gitea.workspace }}
docker build -f Dockerfile -t git.rtj.dev/roland/rtj.dev:0.0.1 .
docker push git.rtj.dev/roland/rtj.dev:0.0.1
- name: Signal Restart
run: |
curl ${{ secrets.OPTIONS }} "${{ secrets.API_KEY }}" ${{ secrets.ENDPOINT }}