From 739f3868ddb276358e83894afc3e7d66d4a6ab41 Mon Sep 17 00:00:00 2001 From: Kirosbr Date: Sun, 21 Jul 2024 06:34:06 +0200 Subject: [PATCH] changement de workflow: debug --- .gitea/workflows/docker_builder_latest.yaml | 94 +++++++++++---------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/.gitea/workflows/docker_builder_latest.yaml b/.gitea/workflows/docker_builder_latest.yaml index e706fac..10b1140 100644 --- a/.gitea/workflows/docker_builder_latest.yaml +++ b/.gitea/workflows/docker_builder_latest.yaml @@ -1,4 +1,5 @@ name: Build and Push Docker Image + on: push: branches: @@ -11,66 +12,69 @@ jobs: container: image: alpine:latest steps: - - name: Increment version - id: increment_version - run: | - # Lire le fichier VERSION - version=$(cat VERSION) - echo "Current version: $version" - - # Extraire les parties majeure, mineure et patch - IFS='.' read -r -a parts <<< "$version" - major=${parts[0]} - minor=${parts[1]} - patch=${parts[2]} - - # Incrémenter la version patch - patch=$((patch + 1)) - - # Créer la nouvelle version - new_version="$major.$minor.$patch" - echo "New version: $new_version" - - # Écrire la nouvelle version dans le fichier VERSION - echo $new_version > VERSION - - # Exporter la nouvelle version comme variable de sortie - echo "::set-output name=new_version::$new_version" - - - name: Commit and push new version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "bot@resk-u.ch" - - # Ajouter et commit le fichier VERSION - git add VERSION - git commit -m "Increment version to ${{ steps.increment_version.outputs.new_version }}" - - # Push les modifications - git push origin main - name: Set up and Install Dependencies run: | - apk update && apk add --no-cache mariadb-connector-c-dev && apk add --no-cache gcc musl-dev nodejs npm git docker libffi-dev libffi + apk update && apk add --no-cache mariadb-connector-c-dev gcc musl-dev nodejs npm git docker libffi-dev libffi + - name: Check out repository code uses: actions/checkout@v4 + + - name: Increment version + id: increment_version + run: | + # Lire le fichier VERSION + version=$(cat VERSION) + echo "Current version: $version" + + # Extraire les parties majeure, mineure et patch + IFS='.' read -r -a parts <<< "$version" + major=${parts[0]} + minor=${parts[1]} + patch=${parts[2]} + + # Incrémenter la version patch + patch=$((patch + 1)) + + # Créer la nouvelle version + new_version="$major.$minor.$patch" + echo "New version: $new_version" + + # Écrire la nouvelle version dans le fichier VERSION + echo $new_version > VERSION + + # Exporter la nouvelle version comme variable de sortie + echo "::set-output name=new_version::$new_version" + + - name: Commit and push new version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "bot@resk-u.ch" + + # Ajouter et commit le fichier VERSION + git add VERSION + git commit -m "Increment version to ${{ steps.increment_version.outputs.new_version }}" + + # Push les modifications + git push origin main + - name: Use server_config_default as primary - run : mv /workspace/CLERC/Reskreen/config/server_config_default.py /workspace/CLERC/Reskreen/config/server_config.py + run: mv /workspace/CLERC/Reskreen/config/server_config_default.py /workspace/CLERC/Reskreen/config/server_config.py + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: cat requirement - run: cat requirements.txt + - name: Log in to Docker Registry uses: docker/login-action@v3 with: registry: gitea.prod.resk-u.ch username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push Docker image uses: docker/build-push-action@v6 with: context: . push: true - tags: gitea.prod.resk-u.ch/clerc/reskreen:latest - + tags: gitea.prod.resk-u.ch/clerc/reskreen:latest