From 6f909a34864b87bb4b142c38b4634309ddaf533c Mon Sep 17 00:00:00 2001 From: leoBitto Date: Sat, 12 Oct 2024 18:28:44 +0200 Subject: [PATCH] in deploy version has been parametrized --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 16d888a..3557a10 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,12 +3,13 @@ name: 03.Deploy Application to Server on: workflow_dispatch: inputs: - image_name: - description: "Docker image name" + version: + description: "Image version to upload" required: true env: REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} jobs: deploy: @@ -112,7 +113,7 @@ jobs: key: ${{ secrets.PRIVATE_KEY }} script: | echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker pull ${{ env.REGISTRY }}/${REPO_NAME_LC,,}:latest-test + docker pull ${{ env.REGISTRY }} ${{ env.IMAGE_NAME }}:${{ inputs.version }} docker compose -f /opt/docker-compose.prod.yml up -d --force-recreate # Step 5: Configurazione di Nginx