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

37 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
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Print repository name
env:
GITEA_REPO: ${{ gitea.repository }}
run: echo "💡 The "$GITEA_REPO:" repository has been cloned to the runner."
- name: Pass login information
env:
DOCKER_AUTH_CONFIG: ${{ secrets.DOCKER_AUTH_CONFIG }}
run: |
docker info
mkdir -p $HOME/.docker
echo "$DOCKER_AUTH_CONFIG" | base64 -d > $HOME/.docker/config.json
- name: Build Docker Image
env:
GITEA_WORKSPACE: ${{ gitea.workspace }}
run: |
cd "$GITEA_WORKSPACE"
docker build -f Dockerfile -t 192.168.1.100:3000/roland/rtj.dev:0.0.1 .
docker push 192.168.1.100:3000/roland/rtj.dev:0.0.1