Updating CI/CD
This commit is contained in:
parent
fa41a5d61e
commit
aedbbec6a2
0
.github/workflows/docker-image-dev.yml → .gitea/workflows/docker-image-dev.yml
Executable file → Normal file
0
.github/workflows/docker-image-dev.yml → .gitea/workflows/docker-image-dev.yml
Executable file → Normal file
20
.github/workflows/docker-image-prod.yml → .gitea/workflows/docker-image-prod.yml
Executable file → Normal file
20
.github/workflows/docker-image-prod.yml → .gitea/workflows/docker-image-prod.yml
Executable file → Normal 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
|
||||
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 checkout $GITHUB_HEAD_REF
|
||||
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
|
Loading…
Reference in New Issue
Block a user