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: pull_request:
branches: branches:
- main - main
workflow_dispatch:
env: env:
DHUB_UNAME: ${{ secrets.DHUB_UNAME }} DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
@ -20,16 +21,23 @@ jobs:
run: | run: |
pwd pwd
whoami whoami
cd /root/silvanus 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 git pull
git checkout $GITHUB_HEAD_REF fi
git checkout ${{ gitea.ref}}
- name: Build the Docker image - name: Build the Docker image
run: | run: |
cd /root/silvanus cd /var/lib/act_runner/silvanus
docker build . --file Dockerfile --tag v0idf1sh/silvanus docker build . --file Dockerfile --tag v0idf1sh/silvanus-exp
- name: Log into Docker Hub - name: Log into Docker Hub
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
- name: Push image to Docker Hub - name: Push image to Docker Hub
run: | run: |
cd /root/silvanus cd /var/lib/act_runner/silvanus
docker push v0idf1sh/silvanus docker push v0idf1sh/silvanus-exp