diff options
| author | soler_j <soler_j@etna-alternance.net> | 2025-04-27 21:02:54 +0200 |
|---|---|---|
| committer | soler_j <soler_j@etna-alternance.net> | 2025-04-27 21:02:54 +0200 |
| commit | bef502c22566c78040e2c17d8ecaf4dcad650272 (patch) | |
| tree | 7ec37738e2895912088ab015bb15c5492e0f8f15 /.github | |
| parent | d497fec2d9d32359428f63595989065c1c9cf5a8 (diff) | |
Suppression du fichier DockerFile, ajout d'un nouveau Dockerfile avec des étapes de compilation pour Go et C++, mise à jour des chemins d'accès et des dépendances, et ajout d'un fichier .dockerignore pour gérer les fichiers à ignorer.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..75b136a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build and Push Docker image + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + env: + IMAGE_NAME: ${{ github.repository }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push with cache + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ env.IMAGE_NAME }}:latest + platforms: linux/amd64,linux/arm64 + cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:cache + cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:cache,mode=max |
