feat: use portainer hook instead of pushing image to gitea package repository
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build and Push Docker Image
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -32,14 +32,13 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.pihkaal.me
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Build Docker image
|
||||
run: docker build --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) -f apps/discord-bot/Dockerfile .
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
docker build --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) -t git.pihkaal.me/pihkaal/lbf-bot:latest -f apps/discord-bot/Dockerfile .
|
||||
docker push git.pihkaal.me/pihkaal/lbf-bot:latest
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Trigger Portainer webhook
|
||||
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"
|
||||
|
||||
Reference in New Issue
Block a user