From b8bdd095336abddcccd31c8ec0f9cb436aabeedd Mon Sep 17 00:00:00 2001 From: Trit0 Date: Sun, 25 May 2025 19:45:03 -0400 Subject: [PATCH] Test CD workflow avec Cedille --- .github/workflows/docker-push.yml | 50 +++++++++++++++++++++++++++++++ Dockerfile | 7 +++++ public/index.html | 6 ++-- 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/docker-push.yml create mode 100644 Dockerfile diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml new file mode 100644 index 0000000..a13437f --- /dev/null +++ b/.github/workflows/docker-push.yml @@ -0,0 +1,50 @@ +name: Docker build and push + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + +env: + REGISTRY: ghcr.io/ConjureETS + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/conjure-site + tags: | + type=ref,event=branch + type=sha + type=raw,value=latest,enable=${{ github.ref_name == 'master' }} + type=raw,value=${{ github.head_ref }},enable=${{ github.event_name == 'pull_request' }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/conjure-site:cache + cache-to: type=registry,ref=${{ env.REGISTRY }}/conjure-site:cache,mode=max \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8952d98 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM nginx:alpine + +COPY public/ /usr/share/nginx/html/ + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/public/index.html b/public/index.html index d98a705..efbb40f 100644 --- a/public/index.html +++ b/public/index.html @@ -170,9 +170,9 @@
- Logo École de technologie supérieure - Logo LanETS - Logo AEETS-color + Logo École de technologie supérieure + Logo LanETS + Logo AEETS-color