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:
|
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
|
Loading…
Reference in New Issue
Block a user