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

31 lines
922 B
YAML
Raw Normal View History

2023-06-10 17:02:47 -04:00
name: rtj.dev Build and Deploy
run-name: Build and Deploy
on: [push]
jobs:
Build-and-Deploy:
runs-on: docker
2023-06-10 18:06:03 -04:00
defaults:
run:
shell: sh
2023-06-10 17:02:47 -04:00
steps:
2023-06-10 17:17:16 -04:00
- name: Setup node.js
2023-06-10 17:40:45 -04:00
run: |
2023-06-10 18:01:53 -04:00
apk --update add nodejs npm git
2023-06-16 22:38:01 -04:00
- name: Check out repository code recursively
2023-06-10 17:02:47 -04:00
uses: actions/checkout@v3
2023-06-10 18:48:17 -04:00
with:
submodules: recursive
- name: Print repository name
2023-06-15 10:04:01 -04:00
run: |
2023-06-15 10:05:30 -04:00
echo "💡 The "${{ gitea.repository }}" repository has been cloned to the runner."
2023-06-10 17:02:47 -04:00
- name: Pass login information
run: |
mkdir -p $HOME/.docker
2023-06-15 10:07:15 -04:00
echo "${{ secrets.DOCKER_AUTH_CONFIG }}" | base64 -d > $HOME/.docker/config.json
2023-06-10 17:02:47 -04:00
- name: Build Docker Image
run: |
2023-06-15 10:07:15 -04:00
cd ${{ gitea.workspace }}
2023-06-10 19:53:04 -04:00
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