Add automatic repository owner to image naming
- Use github.repository_owner in workflow - Image format: REGISTRY_URL/owner/APP_NAME:latest - Works automatically with Gitea registry - Template-friendly: forks use their own owner - Update documentation with new format
This commit is contained in:
@@ -23,9 +23,9 @@ jobs:
|
||||
- name: Build+push ${{ vars.APP_NAME }}
|
||||
run: |
|
||||
cd nuxt4
|
||||
docker build -t $REG/$APP_NAME:${{ github.sha }} -t $REG/$APP_NAME:latest .
|
||||
docker push $REG/$APP_NAME:${{ github.sha }}
|
||||
docker push $REG/$APP_NAME:latest
|
||||
docker build -t $REG/${{ github.repository_owner }}/$APP_NAME:${{ github.sha }} -t $REG/${{ github.repository_owner }}/$APP_NAME:latest .
|
||||
docker push $REG/${{ github.repository_owner }}/$APP_NAME:${{ github.sha }}
|
||||
docker push $REG/${{ github.repository_owner }}/$APP_NAME:latest
|
||||
|
||||
#───────────────── deploy ─────────────────
|
||||
deploy:
|
||||
@@ -33,6 +33,7 @@ jobs:
|
||||
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 }}
|
||||
@@ -46,7 +47,7 @@ jobs:
|
||||
run: |
|
||||
echo "ℹ️ Deploying ${{ vars.APP_NAME }}"
|
||||
echo " Domain: ${{ vars.APP_DOMAIN }}"
|
||||
echo " Registry: ${{ vars.REGISTRY_URL }}"
|
||||
echo " Image: ${{ vars.REGISTRY_URL }}/${{ github.repository_owner }}/${{ vars.APP_NAME }}:latest"
|
||||
echo " Network: principal"
|
||||
|
||||
- name: Pull fresh images used in compose
|
||||
|
||||
Reference in New Issue
Block a user