Updating CI/CD

This commit is contained in:
Skylar Grant 2024-09-22 17:56:32 -04:00
parent fa41a5d61e
commit aedbbec6a2
2 changed files with 15 additions and 7 deletions

View File

@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch:
env:
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
@ -20,16 +21,23 @@ jobs:
run: |
pwd
whoami
cd /root/silvanus
git pull
git checkout $GITHUB_HEAD_REF
mkdir -p /var/lib/act_runner/
cd /var/lib/act_runner/
if [ ! -d "silvanus" ]; then
git clone https://git.vfsh.dev/voidf1sh/silvanus
cd silvanus
else
cd silvanus
git pull
fi
git checkout ${{ gitea.ref}}
- name: Build the Docker image
run: |
cd /root/silvanus
docker build . --file Dockerfile --tag v0idf1sh/silvanus
cd /var/lib/act_runner/silvanus
docker build . --file Dockerfile --tag v0idf1sh/silvanus-exp
- name: Log into Docker Hub
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
- name: Push image to Docker Hub
run: |
cd /root/silvanus
docker push v0idf1sh/silvanus
cd /var/lib/act_runner/silvanus
docker push v0idf1sh/silvanus-exp