Fix: Combinar jobs build y deploy en uno solo para evitar bug de dependencias
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 9s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 9s
This commit is contained in:
@@ -5,12 +5,18 @@ on:
|
|||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
#───────────────── build & push ─────────────────
|
#───────────────── build & deploy ─────────────────
|
||||||
build:
|
build-and-deploy:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
env:
|
env:
|
||||||
REG: ${{ vars.REGISTRY_URL }}
|
REG: ${{ vars.REGISTRY_URL }}
|
||||||
|
REPO_OWNER: ${{ github.repository_owner }}
|
||||||
APP_NAME: ${{ vars.APP_NAME }}
|
APP_NAME: ${{ vars.APP_NAME }}
|
||||||
|
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
|
||||||
|
NUXT_PUBLIC_APP_URL: ${{ vars.NUXT_PUBLIC_APP_URL }}
|
||||||
|
NUXT_AUTHENTIK_API_TOKEN: ${{ secrets.NUXT_AUTHENTIK_API_TOKEN }}
|
||||||
|
NUXT_AUTHENTIK_API_URL: ${{ vars.NUXT_AUTHENTIK_API_URL }}
|
||||||
|
NUXT_PUBLIC_AUTHENTIK_URL: ${{ vars.NUXT_PUBLIC_AUTHENTIK_URL }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
@@ -27,26 +33,6 @@ jobs:
|
|||||||
docker push $REG/${{ github.repository_owner }}/$APP_NAME:${{ github.sha }}
|
docker push $REG/${{ github.repository_owner }}/$APP_NAME:${{ github.sha }}
|
||||||
docker push $REG/${{ github.repository_owner }}/$APP_NAME:latest
|
docker push $REG/${{ github.repository_owner }}/$APP_NAME:latest
|
||||||
|
|
||||||
#───────────────── deploy ─────────────────
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
runs-on: docker
|
|
||||||
env:
|
|
||||||
REG: ${{ vars.REGISTRY_URL }}
|
|
||||||
REPO_OWNER: ${{ github.repository_owner }}
|
|
||||||
APP_NAME: ${{ vars.APP_NAME }}
|
|
||||||
# Variables de entorno para docker-compose
|
|
||||||
APP_DOMAIN: ${{ vars.APP_DOMAIN }}
|
|
||||||
NUXT_PUBLIC_APP_URL: ${{ vars.NUXT_PUBLIC_APP_URL }}
|
|
||||||
# Authentik API Configuration
|
|
||||||
NUXT_AUTHENTIK_API_TOKEN: ${{ secrets.NUXT_AUTHENTIK_API_TOKEN }}
|
|
||||||
NUXT_AUTHENTIK_API_URL: ${{ vars.NUXT_AUTHENTIK_API_URL }}
|
|
||||||
NUXT_PUBLIC_AUTHENTIK_URL: ${{ vars.NUXT_PUBLIC_AUTHENTIK_URL }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Login to registry
|
|
||||||
run: docker login ${{ vars.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Info about environment
|
- name: Info about environment
|
||||||
run: |
|
run: |
|
||||||
echo "ℹ️ Deploying ${{ vars.APP_NAME }}"
|
echo "ℹ️ Deploying ${{ vars.APP_NAME }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user