fix: match fasto pipeline logic, url and secrets
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 1m17s
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 1m17s
This commit is contained in:
@@ -5,10 +5,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
REGISTRY: gitea.local # Update this to your real Gitea domain
|
||||
IMAGE_NAME: ${{ gitea.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -16,10 +12,13 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Convert repository name to lowercase
|
||||
run: echo "repo_name=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
registry: gitea.blyzer.com.br
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
@@ -28,20 +27,19 @@ jobs:
|
||||
with:
|
||||
context: ./backend
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend:latest
|
||||
tags: gitea.blyzer.com.br/${{ env.repo_name }}-backend:latest
|
||||
|
||||
- name: Build and push frontend image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend:latest
|
||||
tags: gitea.blyzer.com.br/${{ env.repo_name }}-frontend:latest
|
||||
|
||||
- name: Trigger Portainer Webhook (Deploy)
|
||||
- name: Deploy to Portainer
|
||||
run: |
|
||||
if [ -n "${{ secrets.PORTAINER_WEBHOOK_URL }}" ]; then
|
||||
echo "Triggering Portainer Webhook..."
|
||||
curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"
|
||||
if [ -n "${{ secrets.PORTAINER_WEBHOOK }}" ]; then
|
||||
curl -k -X POST "${{ secrets.PORTAINER_WEBHOOK }}"
|
||||
else
|
||||
echo "No webhook URL found. Skipping auto-deploy. (You can deploy manually in Portainer)"
|
||||
fi
|
||||
echo "PORTAINER_WEBHOOK secret not set, skipping deployment trigger."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user