Actualizar .github/workflows/ci-cd.yml
Some checks are pending
Primer flujo de trabajo CI/CD (Build, Test and Push Docker Image) / build-and-push (push) Waiting to run
Some checks are pending
Primer flujo de trabajo CI/CD (Build, Test and Push Docker Image) / build-and-push (push) Waiting to run
This commit is contained in:
parent
a51b97bf7b
commit
8f600c7e9f
13
.github/workflows/ci-cd.yml
vendored
13
.github/workflows/ci-cd.yml
vendored
@ -6,6 +6,11 @@ on:
|
||||
branches:
|
||||
- '**' # Cualquier rama
|
||||
|
||||
# ===== Permisos del token automático de GitHub para que pueda "subir"(push del paso 4.) la imagen docker generada en el paso 3 al área de registro de GitHub ghcr.io/profies/aaee_mapamundi_sb =====
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
# ===== Tareas del workflow =====
|
||||
jobs:
|
||||
build-and-push:
|
||||
@ -13,11 +18,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
|
||||
# Descarga código
|
||||
# 1. Descarga código
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# JDK/Maven para tests previos
|
||||
# 2. JDK/Maven para tests previos
|
||||
- name: Configución pasar TEST
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
@ -27,11 +32,11 @@ jobs:
|
||||
- name: Construir proyecto con Maven
|
||||
run: mvn clean package
|
||||
|
||||
# Construir la imagen Docker usando el Dockerfile
|
||||
# 3. Construir la imagen Docker usando el Dockerfile
|
||||
- name: Build Docker image
|
||||
run: docker build -t ghcr.io/${{ github.repository }}:latest .
|
||||
|
||||
# Push a GHCR (GitHub Container Registry)
|
||||
# 4. Push a GHCR (GitHub Container Registry)
|
||||
- name: Push Docker image
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user