add new ci
This commit is contained in:
19
.github/workflows/ci.yml
vendored
Normal file
19
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Deploy to Docker Swarm (Worker Node)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
docker build -t ghcr.io/serverussnap/dickbot:latest .
|
||||
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u serverussnap --password-stdin
|
||||
docker push ghcr.io/serverussnap/dickbot:latest
|
||||
22
.github/workflows/docker-image.yml
vendored
22
.github/workflows/docker-image.yml
vendored
@@ -1,22 +0,0 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build the Docker image
|
||||
run: docker build -t smilerex/dickbot:latest .
|
||||
|
||||
- name: Login docker
|
||||
run: docker login -u ${{secrets.DOCKER_LOGIN}} -p ${{secrets.DOCKER_TOKEN}}
|
||||
|
||||
- name: Deploy docker registry
|
||||
run: docker push smilerex/dickbot:latest
|
||||
Reference in New Issue
Block a user